Abort the job when lastExitCode different from 0

Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
FrancisANDRE 2016-04-09 11:52:47 +02:00
parent c6fe923702
commit 227725bfae

View File

@ -371,12 +371,16 @@ build_script:
- ps: |
if ($env:builder -eq "cygwin")
{
$LastExitCode=0;
$cmd='bash.exe configure --everything';iex "& $cmd"
Write-Host -ForegroundColor Yellow $cmd ' LastExitCode=' $lastExitCode;
$LastExitCode=0;
$cmd='make.exe -s';iex "& $cmd"
Write-Host -ForegroundColor Yellow $cmd ' LastExitCode=' $lastExitCode;
$LastExitCode=0;
$cmd='bash.exe configure --everything';iex "& $cmd"
if ($LastExitCode -ne 0) {
throw "$cmd failed with exit code $LastExitCode."
}
$LastExitCode=0;
$cmd='make.exe -s';iex "& $cmd"
if ($LastExitCode -ne 0) {
throw "$cmd failed with exit code $LastExitCode."
}
}
if ($env:builder -eq "msbuild")
{
@ -454,7 +458,7 @@ test_script:
{
if ($env:builder -eq "cygwin")
{
$LastExitCode=0;
$LastExitCode=0;
if ($env:platform -eq "Win32")
{
$cmd = 'C:\cygwin\usr\sbin\cygserver.exe "&"';iex "& $cmd"
@ -464,8 +468,8 @@ test_script:
$cmd = 'C:\cygwin64\usr\sbin\cygserver.exe "&"';iex "& $cmd"
}
$cmd = 'bash.exe -c "appveyor/Cygwin/runtests.sh"';iex "& $cmd";
Write-Host -ForegroundColor Yellow $cmd ' LastExitCode=' $lastExitCode;
}
Write-Host -ForegroundColor Yellow $cmd ': LastExitCode=' $lastExitCode;
}
if ($env:builder -eq "msbuild" -and $env:linkmode -eq "shared")
{
$suffix = '';