aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-03-27 23:02:27 +0200
committerGitHub <noreply@github.com>2018-03-27 23:02:27 +0200
commit3f3de9b1a95d273463a87516365510dbffcaf3d2 (patch)
treec5a1d424bc596b0b49c7b0f801c1c1bb864d0e84 /ci
parent8d5a46e77b1e0c77296f1d0d192e7906dd37c0d7 (diff)
parent393935c32d48c3a1a02a78df03ea8c67e0a8fb20 (diff)
downloadrneovim-3f3de9b1a95d273463a87516365510dbffcaf3d2.tar.gz
rneovim-3f3de9b1a95d273463a87516365510dbffcaf3d2.tar.bz2
rneovim-3f3de9b1a95d273463a87516365510dbffcaf3d2.zip
Merge #8183 'build/msvc: Fix functional tests'
MSBuild still returns a non-zero exit code because it detects the word "error" in the stdout which is caused by some of the test names such as api/buf {get,set,del}_line get_line : out-of-bounds is an error. CMake mailing list thread: https://cmake.org/pipermail/cmake-developers/2015-October/026775.html There isn't any good solution for it, so I modified the build script to detect the error message printed by RunTests.cmake.
Diffstat (limited to 'ci')
-rw-r--r--ci/build.ps121
1 files changed, 16 insertions, 5 deletions
diff --git a/ci/build.ps1 b/ci/build.ps1
index 7075775bcd..df70b44458 100644
--- a/ci/build.ps1
+++ b/ci/build.ps1
@@ -11,7 +11,6 @@ $depsCmakeVars = @{
$nvimCmakeVars = @{
CMAKE_BUILD_TYPE = $cmakeBuildType;
BUSTED_OUTPUT_TYPE = 'nvim';
- GPERF_PRG = 'C:\msys64\usr\bin\gperf.exe';
}
function exitIfFailed() {
@@ -39,12 +38,10 @@ if ($compiler -eq 'MINGW') {
# Add MinGW to the PATH
$env:PATH = "C:\msys64\mingw$bits\bin;$env:PATH"
- # Remove the Git sh.exe from the PATH
- $env:PATH = $env:PATH.Replace('C:\Program Files\Git\usr\bin', '')
# Build third-party dependencies
C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm -Su" ; exitIfFailed
- C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-$arch-cmake mingw-w64-$arch-perl mingw-w64-$arch-diffutils mingw-w64-$arch-unibilium gperf" ; exitIfFailed
+ C:\msys64\usr\bin\bash -lc "pacman --verbose --noconfirm --needed -S mingw-w64-$arch-cmake mingw-w64-$arch-perl mingw-w64-$arch-diffutils mingw-w64-$arch-unibilium" ; exitIfFailed
}
elseif ($compiler -eq 'MSVC') {
$cmakeGeneratorArgs = '/verbosity:normal'
@@ -56,6 +53,9 @@ elseif ($compiler -eq 'MSVC') {
}
}
+# Remove Git Unix utilities from the PATH
+$env:PATH = $env:PATH.Replace('C:\Program Files\Git\usr\bin', '')
+
# Setup python (use AppVeyor system python)
C:\Python27\python.exe -m pip install neovim ; exitIfFailed
C:\Python35\python.exe -m pip install neovim ; exitIfFailed
@@ -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.'"