Run httpbin locally for the tests in the CI builds
Run httpbin (either directly or inside a container) and set WX_TEST_WEBREQUEST_URL to point to localhost. Note that it is important _not_ to have a trailing slash in the root URL, otherwise WebRequest::Auth::Digest test would fail.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
echo.
|
||||||
|
echo --- Running httpbin...
|
||||||
|
echo.
|
||||||
|
|
||||||
|
pip install httpbin
|
||||||
|
start /b python -m httpbin.core
|
||||||
|
set WX_TEST_WEBREQUEST_URL="http://127.0.0.1:5000"
|
||||||
|
curl http://127.0.0.1:5000/ip
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo --- Running tests.
|
echo --- Running tests.
|
||||||
echo.
|
echo.
|
||||||
|
@@ -12,6 +12,16 @@ wxBUILD_ARGS="-j$wxPROC_COUNT"
|
|||||||
# messages from WebKit tests that we're not interested in.
|
# messages from WebKit tests that we're not interested in.
|
||||||
export NO_AT_BRIDGE=1
|
export NO_AT_BRIDGE=1
|
||||||
|
|
||||||
|
launch_httpbin() {
|
||||||
|
echo 'travis_fold:start:httpbin'
|
||||||
|
echo 'Running httpbin container...'
|
||||||
|
docker pull kennethreitz/httpbin
|
||||||
|
docker run -d -p 80:80 kennethreitz/httpbin
|
||||||
|
WX_TEST_WEBREQUEST_URL="http://localhost"
|
||||||
|
export WX_TEST_WEBREQUEST_URL
|
||||||
|
echo 'travis_fold:end:httpbin'
|
||||||
|
}
|
||||||
|
|
||||||
case $wxTOOLSET in
|
case $wxTOOLSET in
|
||||||
cmake)
|
cmake)
|
||||||
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
||||||
@@ -42,6 +52,8 @@ case $wxTOOLSET in
|
|||||||
echo 'travis_fold:end:install'
|
echo 'travis_fold:end:install'
|
||||||
|
|
||||||
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
||||||
|
launch_httpbin
|
||||||
|
|
||||||
echo 'travis_fold:start:testing'
|
echo 'travis_fold:start:testing'
|
||||||
echo 'Testing...'
|
echo 'Testing...'
|
||||||
ctest -V -C Debug -E "test_drawing" --output-on-failure --interactive-debug-mode 0 .
|
ctest -V -C Debug -E "test_drawing" --output-on-failure --interactive-debug-mode 0 .
|
||||||
@@ -124,6 +136,8 @@ case $wxTOOLSET in
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
launch_httpbin
|
||||||
|
|
||||||
echo 'travis_fold:start:testing'
|
echo 'travis_fold:start:testing'
|
||||||
echo 'Testing...'
|
echo 'Testing...'
|
||||||
pushd tests
|
pushd tests
|
||||||
|
Reference in New Issue
Block a user