diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 1c07d12bdf..a91947b1dc 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -14,10 +14,21 @@ 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" + echo 'Running httpbin...' + + # Prefer to use docker if it's available as it's more robust than dealing + # with pip -- but we need to have a fallback as at least Mac builds don't + # have docker. + if command -v docker; then + docker pull kennethreitz/httpbin + docker run -d -p 80:80 kennethreitz/httpbin + WX_TEST_WEBREQUEST_URL="http://localhost" + else + pip install httpbin + python -m httpbin.core & + WX_TEST_WEBREQUEST_URL="http://localhost:5000" + fi + export WX_TEST_WEBREQUEST_URL echo 'travis_fold:end:httpbin' }