Run httpbin in appveyor.yml to be able to stop it later
There is no way to stop a background task simply and safely with cmd.exe, but in appveyor.yml we can use PowerShell, so use its job support to do it instead. This is important because AppVeyor waits until all jobs launched by the script terminate, so without stopping the background job all builds waited for an hour before timing out.
This commit is contained in:
15
appveyor.yml
15
appveyor.yml
@@ -71,4 +71,19 @@ before_build:
|
||||
|
||||
build_script: c:\projects\wxwidgets\build\tools\appveyor.bat
|
||||
|
||||
before_test:
|
||||
- ps: |
|
||||
Write-Output "Getting and launching httpbin."
|
||||
pip install httpbin
|
||||
Start-Job -Name wx_httpbin { python -m httpbin.core > c:\projects\wxwidgets\httpbin.log }
|
||||
curl http://127.0.0.1:5000/ip
|
||||
$env:WX_TEST_WEBREQUEST_URL="http://127.0.0.1:5000"
|
||||
|
||||
test_script: c:\projects\wxwidgets\build\tools\appveyor-test.bat
|
||||
|
||||
after_test:
|
||||
- ps: |
|
||||
Stop-Job -Name wx_httpbin
|
||||
Write-Output "--- httpbin output ---"
|
||||
Get-Content c:\projects\wxwidgets\httpbin.log
|
||||
Write-Output "--- httpbin output end ---"
|
||||
|
@@ -1,12 +1,3 @@
|
||||
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 --- Running tests.
|
||||
echo.
|
||||
|
Reference in New Issue
Block a user