Disable the tests if launching httpbin failed for some reason

This is not ideal, but will have to do for now.
This commit is contained in:
Vadim Zeitlin 2021-01-27 10:04:31 +01:00
parent 4bdbbeca4a
commit 6a170343ae

View File

@ -76,8 +76,14 @@ before_test:
Write-Output "Getting and launching httpbin." Write-Output "Getting and launching httpbin."
C:\Python35\Scripts\pip.exe --disable-pip-version-check --no-warn-script-location install httpbin C:\Python35\Scripts\pip.exe --disable-pip-version-check --no-warn-script-location install httpbin
Start-Job -Name wx_httpbin { C:\Python35\python.exe -m httpbin.core 2>&1 > c:\projects\wxwidgets\httpbin.log } Start-Job -Name wx_httpbin { C:\Python35\python.exe -m httpbin.core 2>&1 > c:\projects\wxwidgets\httpbin.log }
curl http://127.0.0.1:5000/ip Start-Sleep -Seconds 5
$env:WX_TEST_WEBREQUEST_URL="http://127.0.0.1:5000" if (curl -s http://127.0.0.1:5000/ip > $null) {
$env:WX_TEST_WEBREQUEST_URL="http://127.0.0.1:5000"
}
else {
Write-Error "Disabling wxWebRequest tests as launching httpbin failed."
$env:WX_TEST_WEBREQUEST_URL="0"
}
test_script: c:\projects\wxwidgets\build\tools\appveyor-test.bat test_script: c:\projects\wxwidgets\build\tools\appveyor-test.bat