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.
@@ -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"
@@ -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
}
