]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: add a .exclusive. toggle to ensure that certain tests run in serial
authorMatthias Maier <tamiko@43-1.org>
Sun, 20 Feb 2022 17:00:23 +0000 (11:00 -0600)
committerMatthias Maier <tamiko@43-1.org>
Mon, 21 Feb 2022 11:03:06 +0000 (05:03 -0600)
cmake/macros/macro_deal_ii_add_test.cmake

index 99131a6c51090850d9d3d325a7d97172c692f80c..b9a830eef5e1befb20244f1829e00018386e144e 100644 (file)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.