mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
ci: fail on test failures
PowerShell can _read_ top-level variables in functions, but cannot _update_
top-level variables in functions unless they're explicitly prefixed with
`$global`.
(cherry picked from commit 0e26717a57)
This commit is contained in:
committed by
Patrick Steinhardt
parent
a6917dc787
commit
a20b8c2199
@@ -7,7 +7,7 @@ $PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
|
||||
$SourceDir = Split-Path (Split-Path (Get-Variable MyInvocation).Value.MyCommand.Path)
|
||||
$BuildDir = Get-Location
|
||||
$Success = $true
|
||||
$global:Success = $true
|
||||
|
||||
if ($Env:SKIP_TESTS) { exit }
|
||||
|
||||
@@ -25,7 +25,7 @@ function run_test {
|
||||
Write-Host $TestCommand
|
||||
Invoke-Expression $TestCommand
|
||||
|
||||
if ($LastExitCode -ne 0) { $Success = $false }
|
||||
if ($LastExitCode -ne 0) { $global:Success = $false }
|
||||
}
|
||||
|
||||
Write-Host "##############################################################################"
|
||||
@@ -69,4 +69,4 @@ if (-not $Env:SKIP_PROXY_TESTS) {
|
||||
taskkill /F /IM javaw.exe
|
||||
}
|
||||
|
||||
if (-not $Success) { exit 1 }
|
||||
if (-Not $global:Success) { exit 1 }
|
||||
|
||||
Reference in New Issue
Block a user