Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Apveyor: Abort PS script if command fails:
* Do not fail build if unit tests output to stderr
  • Loading branch information
ximinez authored and mellery451 committed Dec 22, 2016
1 parent c0904e1 commit 876dcdb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions appveyor.yml
Expand Up @@ -69,6 +69,7 @@ install:
echo "Download from $env:RIPPLED_DEPS_URL"
Start-FileDownload "$env:RIPPLED_DEPS_URL"
7z x "$($env:RIPPLED_DEPS_PATH).zip" -oC:\ -y > $null
if ($LastExitCode -ne 0) { throw "7z failed" }
}
# Newer DEPS include a versions file.
Expand All @@ -92,6 +93,7 @@ build_script:
if ($env:build -eq "scons") {
# Build with scons
scons $env:target -j%NUMBER_OF_PROCESSORS%
if ($LastExitCode -ne 0) { throw "scons build failed" }
}
else
{
Expand All @@ -102,7 +104,9 @@ build_script:
New-Item -ItemType Directory -Force -Path "build/$cmake_target"
Push-Location "build/$cmake_target"
cmake -G"Visual Studio 14 2015 Win64" -Dtarget="$cmake_target" ../..
if ($LastExitCode -ne 0) { throw "CMake failed" }
cmake --build . --config $env:buildconfig -- -m
if ($LastExitCode -ne 0) { throw "CMake build failed" }
Pop-Location
}
Expand All @@ -122,6 +126,10 @@ after_build:
test_script:
- ps: |
# Run the rippled unit tests
& $exe --unittest
& {
# Run the rippled unit tests
& $exe --unittest
# https://connect.microsoft.com/PowerShell/feedback/details/751703/option-to-stop-script-if-command-line-exe-fails
if ($LastExitCode -ne 0) { throw "Unit tests failed" }
}

0 comments on commit 876dcdb

Please sign in to comment.