Commit cf355c53 authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED manually re-run failed tests

parent 9fc14383
......@@ -81,7 +81,27 @@ if grep --quiet "Fatal error" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/ci-test.log; then
echo "===== Failed tests ====="
grep -e "\*\*\*Failed" -e "SegFault" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log
echo
exit 1
echo "===== Re-run failed ====="
# loop over failed
grep -e "\*\*\*Failed" -e "SegFault" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log |
while IFS= read -r line; do
testname=$(echo $line | sed -r 's/.+[0-9]+:\s(.*)\s\..*/\1/g')
ctest -VV \
-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" \
$testname > >(tee --append ${PROJECT_LOG_DIR}/rerun-test.log | grep --line-buffered -e "Test \#") 2>&1
done
if grep --quiet "\*\*\*Failed" -e "SegFault" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/rerun-test.log; then
exit 1
else
echo "Re-run OK"
fi
else
echo "OK"
fi
Markdown is supported
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