ci: AppVeyor: coverage for Lua (Windows) (#10426)

This commit is contained in:
Daniel Hahler 2019-10-09 03:07:42 +02:00 committed by GitHub
parent 7e4b744b64
commit db9f68f98d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 8 deletions

View File

@ -46,6 +46,10 @@ if ($compiler -eq 'MINGW') {
$nvimCmakeVars['USE_GCOV'] = 'ON' $nvimCmakeVars['USE_GCOV'] = 'ON'
$uploadToCodecov = $true $uploadToCodecov = $true
$env:GCOV = "C:\msys64\mingw$bits\bin\gcov" $env:GCOV = "C:\msys64\mingw$bits\bin\gcov"
# Setup/build Lua coverage.
$env:USE_LUACOV = 1
$env:BUSTED_ARGS = "--coverage"
} }
# These are native MinGW builds, but they use the toolchain inside # These are native MinGW builds, but they use the toolchain inside
# MSYS2, this allows using all the dependencies and tools available # MSYS2, this allows using all the dependencies and tools available
@ -135,6 +139,10 @@ cmake --build . --config $cmakeBuildType -- $cmakeGeneratorArgs ; exitIfFailed
# Ensure that the "win32" feature is set. # Ensure that the "win32" feature is set.
.\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' ; exitIfFailed .\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' ; exitIfFailed
if ($env:USE_LUACOV -eq 1) {
& $env:DEPS_PREFIX\luarocks\luarocks.bat install cluacov
}
# Functional tests # Functional tests
# The $LastExitCode from MSBuild can't be trusted # The $LastExitCode from MSBuild can't be trusted
$failed = $false $failed = $false
@ -143,19 +151,18 @@ Set-PSDebug -Off
cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 | cmake --build . --config $cmakeBuildType --target functionaltest -- $cmakeGeneratorArgs 2>&1 |
foreach { $failed = $failed -or foreach { $failed = $failed -or
$_ -match 'functional tests failed with error'; $_ } $_ -match 'functional tests failed with error'; $_ }
if ($failed) {
if ($uploadToCodecov) { if ($uploadToCodecov) {
bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest if ($env:USE_LUACOV -eq 1) {
& $env:DEPS_PREFIX\bin\luacov.bat
} }
bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest
}
if ($failed) {
exit $LastExitCode exit $LastExitCode
} }
Set-PSDebug -Strict -Trace 1 Set-PSDebug -Strict -Trace 1
if ($uploadToCodecov) {
bash -l /c/projects/neovim/ci/common/submit_coverage.sh functionaltest
}
# Old tests # Old tests
# Add MSYS to path, required for e.g. `find` used in test scripts. # Add MSYS to path, required for e.g. `find` used in test scripts.
# But would break functionaltests, where its `more` would be used then. # But would break functionaltests, where its `more` would be used then.