From: Matthias Maier Date: Sun, 20 Feb 2022 17:00:23 +0000 (-0600) Subject: CMake: add a .exclusive. toggle to ensure that certain tests run in serial X-Git-Tag: v9.4.0-rc1~458^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=508a2f34700aaa0cb0628358310cc50cd8b33518;p=dealii.git CMake: add a .exclusive. toggle to ensure that certain tests run in serial --- diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index 99131a6c51..b9a830eef5 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -208,6 +208,14 @@ FUNCTION(DEAL_II_ADD_TEST _category _test_name _comparison_file) SET(_run_only TRUE) ENDIF() + # + # Determine whether the .exclusive. keyword is present: + # + SET(_exclusive FALSE) + IF(_file MATCHES "\\.exclusive\\.") + SET(_exclusive TRUE) + ENDIF() + # # Determine for which build types a test should be defined. # @@ -495,9 +503,14 @@ FUNCTION(DEAL_II_ADD_TEST _category _test_name _comparison_file) TIMEOUT ${TEST_TIME_LIMIT} ) - IF(NOT ENABLE_PERFORMANCE_TESTS) + IF(_exclusive) + # + # Ensure that the test is not executed concurrently with any other + # tests. + # + SET_TESTS_PROPERTIES(${_test_full} PROPERTIES RUN_SERIAL TRUE) - IF(NOT ENABLE_PERFORMANCE_TESTS) + ELSEIF(NOT ENABLE_PERFORMANCE_TESTS) # # Limit concurrency of mpi tests. We can only set concurrency for # the entire test, which includes the compiling and linking stages