diff options
author | b-r-o-c-k <brockmammen@gmail.com> | 2018-03-26 10:54:44 -0500 |
---|---|---|
committer | b-r-o-c-k <brockmammen@gmail.com> | 2018-03-26 10:54:44 -0500 |
commit | afe6b4881f70df32107089d3c7df232d70eeda2e (patch) | |
tree | 27e07618e9e1e9ea9a71acce1ab6953c7f14edcc | |
parent | afd46b78c5b431065e8439e82ade86672baf9c08 (diff) | |
download | rneovim-afe6b4881f70df32107089d3c7df232d70eeda2e.tar.gz rneovim-afe6b4881f70df32107089d3c7df232d70eeda2e.tar.bz2 rneovim-afe6b4881f70df32107089d3c7df232d70eeda2e.zip |
build/msvc: Add workaround for false positive exit code from MSBuild
See https://cmake.org/pipermail/cmake-developers/2015-October/026775.html
-rw-r--r-- | ci/build.ps1 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ci/build.ps1 b/ci/build.ps1 index 7075775bcd..9fb59b438d 100644 --- a/ci/build.ps1 +++ b/ci/build.ps1 @@ -91,7 +91,18 @@ cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed bin\nvim --version ; exitIfFailed # Functional tests -cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs ; exitIfFailed +# The $LastExitCode from MSBuild can't be trusted +$failed = $false +# Temporarily turn off tracing to reduce log file output +Set-PSDebug -Off +cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs | + foreach { $failed = $failed -or + $_ -match 'Running functional tests failed with error'; $_ } +Set-PSDebug -Trace 1 +if ($failed) { + exit $LastExitCode +} + if ($uploadToCodecov) { C:\msys64\usr\bin\bash -lc "cd /c/projects/neovim; bash <(curl -s https://codecov.io/bash) -c -F functionaltest || echo 'codecov upload failed.'" |