Skip to content
Snippets Groups Projects
Verified Commit 93a0a1e2 authored by Lars Bilke's avatar Lars Bilke
Browse files

[ci] Use ctest labels.

parent 989a41ea
No related branches found
No related tags found
No related merge requests found
...@@ -24,18 +24,18 @@ ...@@ -24,18 +24,18 @@
if [ "$BUILD_TESTS" = true ] ; then $BUILD_CMD_PREFIX cmake --build . --target tests ; fi if [ "$BUILD_TESTS" = true ] ; then $BUILD_CMD_PREFIX cmake --build . --target tests ; fi
if [ "$BUILD_CTEST" = true ]; then if [ "$BUILD_CTEST" = true ]; then
ctest_labels="default"
if [ "$BUILD_CTEST_LARGE" = true ] ; then ctest_labels="large|$ctest_labels" ; fi
ctest_exit=0 ctest_exit=0
ctest -T Test --no-compress-output --exclude-regex LARGE --timeout 900 || ctest_exit=$? ctest -T Test --no-compress-output -L "$ctest_labels" || ctest_exit=$?
if [ $ctest_exit -ne 0 ]; then if [ $ctest_exit -ne 0 ]; then
echo "ctests failed (showing the last ${NUM_CTEST_ERROR_LINES} lines):" echo "ctests failed (showing the last ${NUM_CTEST_ERROR_LINES} lines):"
xsltproc ${CI_PROJECT_DIR}/scripts/test/ctest-error-output.xsl Testing/*/Test.xml | tail -n ${NUM_CTEST_ERROR_LINES} xsltproc ${CI_PROJECT_DIR}/scripts/test/ctest-error-output.xsl Testing/*/Test.xml | tail -n ${NUM_CTEST_ERROR_LINES}
exit $ctest_exit exit $ctest_exit
fi fi
cp Testing/**/Test.xml Tests/ctest.xml
fi fi
if [ "$BUILD_CTEST_LARGE" = true ] ; then $BUILD_CMD_PREFIX cmake --build . --target ctest-large ; fi
if [ "$BUILD_CTEST" = true ] ; then cp Testing/**/Test.xml Tests/ctest.xml ; fi
if [ "$BUILD_CTEST_LARGE" = true ] ; then cp Testing/**/Test.xml Tests/ctest-large.xml ; fi
else else
$BUILD_CMD_PREFIX cmake --build . --target ${TARGETS} > >(tee make.output) $BUILD_CMD_PREFIX cmake --build . --target ${TARGETS} > >(tee make.output)
fi fi
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
- | - |
if($env:BUILD_CTEST -eq "true") if($env:BUILD_CTEST -eq "true")
{ {
ctest -T Test --no-compress-output --exclude-regex LARGE --timeout 900 ctest -T Test --no-compress-output -LE large
$ctest_exit=$? $ctest_exit=$?
if(!$ctest_exit) if(!$ctest_exit)
{ {
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
Get-Content -Path ./ctest-error-ouput.txt -Tail $env:NUM_CTEST_ERROR_LINES Get-Content -Path ./ctest-error-ouput.txt -Tail $env:NUM_CTEST_ERROR_LINES
exit $ctest_exit exit $ctest_exit
} }
cp Testing/**/Test.xml Tests/ctest.xml
} }
- if($env:BUILD_CTEST -eq "true") { cp Testing/**/Test.xml Tests/ctest.xml }
- | - |
if($env:CHECK_WARNINGS -eq "true" -and (cat make.output | Select-String -Pattern ': warning') ) if($env:CHECK_WARNINGS -eq "true" -and (cat make.output | Select-String -Pattern ': warning') )
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment