diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-09-11 15:15:26 -0700 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-09-17 20:04:47 -0700 |
commit | a8301b0c19cc738961604a14b7e132b2b97e064c (patch) | |
tree | 3599833380be348c9202322aaaad9c4550a775f6 | |
parent | fff33a1b65994e1f781f73d06e22d3f8778eff02 (diff) | |
download | libgit2-a8301b0c19cc738961604a14b7e132b2b97e064c.tar.gz |
ci: add SKIP_*_TESTS for windows builds
Introduce SKIP_*_TEST variables for Windows builds to match POSIX
builds.
-rw-r--r-- | ci/test.ps1 | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/ci/test.ps1 b/ci/test.ps1 index 843df7034..89301d45a 100644 --- a/ci/test.ps1 +++ b/ci/test.ps1 @@ -11,10 +11,12 @@ Write-Host "#################################################################### Write-Host "## Configuring test environment" Write-Host "##############################################################################" -Write-Host "" -Write-Host "Starting HTTP proxy..." -Invoke-WebRequest -Method GET -Uri https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar -OutFile poxyproxy.jar -javaw -jar poxyproxy.jar -d --port 8080 --credentials foo:bar +if (-not $Env:SKIP_PROXY_TESTS) { + Write-Host "" + Write-Host "Starting HTTP proxy..." + Invoke-WebRequest -Method GET -Uri https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar -OutFile poxyproxy.jar + javaw -jar poxyproxy.jar -d --port 8080 --credentials foo:bar +} Write-Host "" Write-Host "##############################################################################" @@ -24,22 +26,27 @@ Write-Host "#################################################################### ctest -V -R offline if ($LastExitCode -ne 0) { [Environment]::Exit($LastExitCode) } -Write-Host "" -Write-Host "##############################################################################" -Write-Host "## Running (online) tests" -Write-Host "##############################################################################" +if (-not $Env:SKIP_ONLINE_TESTS) { + Write-Host "" + Write-Host "##############################################################################" + Write-Host "## Running (online) tests" + Write-Host "##############################################################################" -ctest -V -R online -if ($LastExitCode -ne 0) { [Environment]::Exit($LastExitCode) } + ctest -V -R online + if ($LastExitCode -ne 0) { [Environment]::Exit($LastExitCode) } +} -Write-Host "" -Write-Host "Running proxy tests" -Write-Host "" +if (-not $Env:SKIP_PROXY_TESTS) { + Write-Host "" + Write-Host "Running proxy tests" + Write-Host "" -$Env:GITTEST_REMOTE_PROXY_URL="localhost:8080" -$Env:GITTEST_REMOTE_PROXY_USER="foo" -$Env:GITTEST_REMOTE_PROXY_PASS="bar" -ctest -V -R proxy -if ($LastExitCode -ne 0) { [Environment]::Exit($LastExitCode) } + $Env:GITTEST_REMOTE_PROXY_URL="localhost:8080" + $Env:GITTEST_REMOTE_PROXY_USER="foo" + $Env:GITTEST_REMOTE_PROXY_PASS="bar" + ctest -V -R proxy + if ($LastExitCode -ne 0) { [Environment]::Exit($LastExitCode) } + + taskkill /F /IM javaw.exe +} -taskkill /F /IM javaw.exe |