Skip to content

Commit

Permalink
hack/ci/windows.ps1: explicitly set exit code to result of tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
thaJeztah committed Sep 6, 2019
1 parent 4ce0402 commit 8e8c52c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hack/ci/windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -997,4 +1000,6 @@ Finally {

$Dur=New-TimeSpan -Start $StartTime -End $(Get-Date)
Write-Host -ForegroundColor $FinallyColour "`nINFO: executeCI.ps1 exiting at $(date). Duration $dur`n"

exit $tmpLastExitCode
}

0 comments on commit 8e8c52c

Please sign in to comment.