hack/ci/windows.ps1: explicitly set exit code to result of tests

Trying to see if this helps with the cleanup step exiting in CI, but
Jenkins continuing to wait for the script to end afterwards.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8e8c52c4ab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-09-02 14:10:11 +02:00
parent d58829550e
commit 4329550a74
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -960,6 +960,9 @@ Catch [Exception] {
Throw $_
}
Finally {
# Preserve the LastExitCode of the tests
$tmpLastExitCode = $LastExitCode
$ErrorActionPreference="SilentlyContinue"
$global:ProgressPreference=$origProgressPreference
Write-Host -ForegroundColor Green "INFO: Tidying up at end of run"
@ -993,4 +996,6 @@ Finally {
Nuke-Everything
$Dur=New-TimeSpan -Start $StartTime -End $(Get-Date)
Write-Host -ForegroundColor $FinallyColour "`nINFO: executeCI.ps1 exiting at $(date). Duration $dur`n"
exit $tmpLastExitCode
}