Commit 6d3b0b01 authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

FIXED apparently their is cmake bug on Windows when using rerun

see https://gitlab.kitware.com/cmake/cmake/issues/17767
parent 0a8fa83c
......@@ -47,32 +47,39 @@ ctest -VV \
-S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-test.cmake > >(tee --append ${PROJECT_LOG_DIR}/test.log | grep --line-buffered -e "Test \#") 2>&1
# Rerun just the failed tests
echo "===== Re-running failed tests ====="
ctest -VV \
--rerun-failed \
-DCTEST_SITE="$CDASH_SITE" \
-DCI_MODE="$CAMITK_CI_MODE" \
-DCI_ID="P $CI_PIPELINE_ID - J $CI_BUILD_ID" \
-DCI_BRANCH="$CI_COMMIT_REF_NAME" \
-DCI_BUILD_SETTINGS="$COMPILER_CONFIG" \
-DCI_PROJECT_LOG_DIRECTORY="$CI_PROJECT_DIR/$PROJECT_LOG_DIR" \
-DCTEST_SOURCE_DIRECTORY="$PROJECT_SOURCE_DIR" \
-DCTEST_BINARY_DIRECTORY="$PROJECT_BUILD_DIR" \
-S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-test.cmake > >(tee --append ${PROJECT_LOG_DIR}/test.log | grep --line-buffered -e "Test \#") 2>&1
# There seems to be a bug in CMake, disabling rerun for Win32 plateform
# see https://gitlab.kitware.com/cmake/cmake/issues/17767
if [[ "$OS" != "win7" ]]; then
echo "===== Re-running failed tests ====="
ctest -VV \
--rerun-failed \
-DCTEST_SITE="$CDASH_SITE" \
-DCI_MODE="$CAMITK_CI_MODE" \
-DCI_ID="P $CI_PIPELINE_ID - J $CI_BUILD_ID" \
-DCI_BRANCH="$CI_COMMIT_REF_NAME" \
-DCI_BUILD_SETTINGS="$COMPILER_CONFIG" \
-DCI_PROJECT_LOG_DIRECTORY="$CI_PROJECT_DIR/$PROJECT_LOG_DIR" \
-DCTEST_SOURCE_DIRECTORY="$PROJECT_SOURCE_DIR" \
-DCTEST_BINARY_DIRECTORY="$PROJECT_BUILD_DIR" \
-S $PROJECT_SOURCE_DIR/sdk/cmake/ctest/ci-test.cmake > >(tee --append ${PROJECT_LOG_DIR}/test.log | grep --line-buffered -e "Test \#") 2>&1
fi
# if [[ "$OS" != "win7" ]]; then
# # shutdown xvfb
# kill $xvfbPid
# fi
echo "Not run or disabled tests:"
grep -e "Disabled" -e "Not Run" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log
echo
echo "===== Not run or disabled tests ====="
grep -e "Not Run" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log
# as ctest return a strange 255 error, check the log
if grep --quiet "Fatal error" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/ci-test.log; then
echo
echo "===== Fatal errors ====="
echo "Found fatal error in $CI_PROJECT_DIR/$PROJECT_LOG_DIR/ci-test.log"
echo
echo "Failed tests:"
echo "===== Failed tests ====="
grep -e "Failed" -e "SegFault" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log
echo
exit 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment