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:
@@ -12,6 +12,16 @@ wxBUILD_ARGS="-j$wxPROC_COUNT"
|
||||
# messages from WebKit tests that we're not interested in.
|
||||
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
|
||||
cmake)
|
||||
if [ -z $wxCMAKE_TESTS ]; then wxCMAKE_TESTS=CONSOLE_ONLY; fi
|
||||
@@ -42,6 +52,8 @@ case $wxTOOLSET in
|
||||
echo 'travis_fold:end:install'
|
||||
|
||||
if [ "$wxCMAKE_TESTS" != "OFF" ]; then
|
||||
launch_httpbin
|
||||
|
||||
echo 'travis_fold:start:testing'
|
||||
echo 'Testing...'
|
||||
ctest -V -C Debug -E "test_drawing" --output-on-failure --interactive-debug-mode 0 .
|
||||
@@ -124,6 +136,8 @@ case $wxTOOLSET in
|
||||
exit 0
|
||||
fi
|
||||
|
||||
launch_httpbin
|
||||
|
||||
echo 'travis_fold:start:testing'
|
||||
echo 'Testing...'
|
||||
pushd tests
|
||||
|
Reference in New Issue
Block a user