Commit 60022a4d authored by Emmanuel Promayon's avatar Emmanuel Promayon
Browse files

NEW rerun failed (try to address Xvfb bug) + improved test log

parent e8ac807b
......@@ -16,12 +16,12 @@ if ! grep -q TRIGGER_STAGE_TEST "${PROJECT_LOG_DIR}/trigger-stage.txt"; then
fi
if [[ "$OS" != "win7" ]]; then
echo "===== Configuring xvfb =====" > >(tee ${PROJECT_LOG_DIR}/test.log) 2>&1
echo "===== Configuring xvfb =====" > >(tee --append ${PROJECT_LOG_DIR}/test.log) 2>&1
# Starts the server first (try to avoid unexpected and random "QXcbConnection: Could not connect to display :99")
export DISPLAY=":98"
# create a specific file for xauth
export XAUTHORITY=$(mktemp)
Xvfb $DISPLAY -screen 0 1280x1024x16 -ac -nolisten tcp -nolisten unix -auth $XAUTHORITY & > >(tee ${PROJECT_LOG_DIR}/test.log) 2>&1
Xvfb $DISPLAY -screen 0 1280x1024x16 -ac -nolisten tcp -nolisten unix -auth $XAUTHORITY & > >(tee --append ${PROJECT_LOG_DIR}/test.log) 2>&1
trap "kill $! || true" EXIT
# give some times to start the Xvfb
sleep 10
......@@ -42,16 +42,37 @@ ctest -VV \
-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 ${PROJECT_LOG_DIR}/test.log | grep --line-buffered -e "Test \#") 2>&1
-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
# 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
# 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 "Found fatal error in $CI_PROJECT_DIR/$PROJECT_LOG_DIR/ci-test.log"
echo
echo "Failed tests:"
grep -e "Failed" -e "SegFault" $CI_PROJECT_DIR/$PROJECT_LOG_DIR/test.log
echo
exit 1
else
echo "OK"
......
......@@ -50,3 +50,15 @@ if(WIN32)
"This test passes when run directly from a physical windows machine.\n")
set_tests_properties(action-itkfilters-integration-test PROPERTIES DISABLED true)
endif()
if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
message(WARNING "Disabling test action-itkfilters-integration-test\n"
"Reason: VTK version is not equals than 6.3\n"
"VTK 6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3.\n"
"Ubuntu 16.04 LTS is supported but these tests will fail if not disabled\n"
"VTK 7 has a different file format version, which is written in the header\n"
"On debian buster, the default VTK version is 7.1 not 6.3\n"
"Debian buster is supported but these tests will fail if not disabled\n")
set_tests_properties(action-itkfilters-integration-test PROPERTIES DISABLED true)
endif()
......@@ -16,10 +16,11 @@ set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_
if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
message(WARNING "Disabling test action-reconstruction-integration-test\n"
"Reason: VTK version is less than 6.3\n"
"VTK6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"Reason: VTK version is not equals than 6.3\n"
"VTK 6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3.\n"
"Ubuntu 16.04 LTS is supported but these tests will fail if not disabled\n"
"VTK 7 has a different file format version, which is written in the header\n"
"On debian buster, the default VTK version is 7.1 not 6.3\n"
"Debian buster is supported but these tests will fail if not disabled\n")
set_tests_properties(action-reconstruction-integration-test PROPERTIES DISABLED true)
......
......@@ -23,10 +23,11 @@ set(SHIBOKEN_CAMITK_SDK_PATH ${SHIBOKEN_CAMITK_SDK_PATH}:${CMAKE_CURRENT_SOURCE_
if(NOT "${VTK_VERSION}" VERSION_EQUAL 6.3)
message(WARNING "Disabling test component-vtkmesh-level3-1 to component-vtkmesh-level3-16\n"
"Reason: VTK version is less than 6.3\n"
"VTK6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"Reason: VTK version is not equals than 6.3\n"
"VTK 6.2 has a bug when it saves vtk files: it does not save the proper VTK file format version\n"
"On Ubuntu 16.04 LTS, the default VTK version is 6.2 not 6.3.\n"
"Ubuntu 16.04 LTS is supported but these tests will fail if not disabled\n"
"VTK 7 has a different file format version, which is written in the header\n"
"On debian buster, the default VTK version is 7.1 not 6.3\n"
"Debian buster is supported but these tests will fail if not disabled\n")
set_tests_properties(component-vtkmesh-level3-1
......
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