From: Matthias Maier Date: Tue, 24 Jan 2023 03:06:55 +0000 (-0600) Subject: CMake: add_test(): remove compilation interrupt guard X-Git-Tag: v9.5.0-rc1~603^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a661aac1e029cbacaadfc7786a753c8ace3c4e9;p=dealii.git CMake: add_test(): remove compilation interrupt guard --- diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index b14cce2bc7..87cdd40288 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -446,21 +446,10 @@ function(deal_ii_add_test _category _test_name _comparison_file) # if(NOT TARGET ${_target}) - # - # Add a "guard file" rule: The purpose of interrupt_guard.cc is to - # force a complete rerun of this test (BUILD, RUN and DIFF stage) - # if interrupt_guard.cc is removed by run_test.cmake due to an - # interruption. - # - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target_short}/interrupt_guard.cc - COMMAND touch ${CMAKE_CURRENT_BINARY_DIR}/${_target_short}/interrupt_guard.cc - ) add_executable(${_target} EXCLUDE_FROM_ALL ${_generated_files} ${_source_file} - ${CMAKE_CURRENT_BINARY_DIR}/${_target_short}/interrupt_guard.cc ) set_target_properties(${_target} PROPERTIES OUTPUT_NAME ${_target_short}) @@ -507,7 +496,6 @@ function(deal_ii_add_test _category _test_name _comparison_file) -DTEST=${_test_executable_full} -DEXPECT=PASSED -DBINARY_DIR=${CMAKE_BINARY_DIR} - -DGUARD_FILE=${CMAKE_CURRENT_BINARY_DIR}/${_test_name}.${_build_lowercase}/interrupt_guard.cc -P ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.cmake WORKING_DIRECTORY ${_test_directory} ) @@ -593,7 +581,6 @@ function(deal_ii_add_test _category _test_name _comparison_file) -DTEST=${_test_full} -DEXPECT=${_expect} -DBINARY_DIR=${CMAKE_BINARY_DIR} - # no guard file -P ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.cmake WORKING_DIRECTORY ${_test_directory} ) @@ -611,7 +598,6 @@ function(deal_ii_add_test _category _test_name _comparison_file) -DTEST=${_test_full} -DEXPECT=${_expect} -DBINARY_DIR=${CMAKE_BINARY_DIR} - -DGUARD_FILE=${CMAKE_CURRENT_BINARY_DIR}/${_test_name}.${_build_lowercase}/interrupt_guard.cc -P ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.cmake WORKING_DIRECTORY ${_test_directory} ) diff --git a/cmake/scripts/run_test.cmake b/cmake/scripts/run_test.cmake index d06f8b7afb..cf9271cdd7 100644 --- a/cmake/scripts/run_test.cmake +++ b/cmake/scripts/run_test.cmake @@ -27,26 +27,6 @@ # (return value 0) # Possible values are CONFIGURE, BUILD, RUN, DIFF, PASSED # -# GUARD_FILE - used to detect a forced interruption of this script: On -# startup the backed up file ${GUARD_FILE}_bck is put back -# in place as ${GUARD_FILE} and on exit ${GUARD_FILE} is -# backed up as ${GUARD_FILE}_bck. If on startup a stale -# ${GUARD_FILE} is found, it is deleted. -# - -if(NOT "${GUARD_FILE}" STREQUAL "" AND EXISTS ${GUARD_FILE}) - # - # Guard file still exists, so this script must have been interrupted. - # Remove guard file to force a complete rerun: - # - execute_process(COMMAND rm -f ${GUARD_FILE}) -elseif(NOT "${GUARD_FILE}" STREQUAL "" AND EXISTS ${GUARD_FILE}_bck) - # - # A backed up guard file exists. Put it back in place: - # - execute_process(COMMAND mv ${GUARD_FILE}_bck ${GUARD_FILE}) -endif() - if("${EXPECT}" STREQUAL "") set(EXPECT "PASSED") @@ -127,14 +107,6 @@ endif() message("=============================== OUTPUT END ===============================") -# -# Back up guard file: -# - -if(NOT "${GUARD_FILE}" STREQUAL "" AND EXISTS ${GUARD_FILE}) - execute_process(COMMAND mv ${GUARD_FILE} ${GUARD_FILE}_bck) -endif() - # # Bail out: #