]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Introduce DEAL_II_PICKUP_REGEX
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 22 Aug 2013 23:42:57 +0000 (23:42 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 22 Aug 2013 23:42:57 +0000 (23:42 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30442 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake

index e3b907ee95f0c139a521245cf04c538f19615719..a998030039ead47da4a7ed6f378a05cb638d7829 100644 (file)
@@ -17,6 +17,9 @@
 #
 # A Macro to pick up all tests in a test subdirectory
 #
+# If DEAL_II_PICKUP_REGEX is set, only tests matching the regex will be
+# processed.
+#
 # Usage:
 #     DEAL_II_PICKUP_TESTS()
 #
@@ -28,17 +31,22 @@ MACRO(DEAL_II_PICKUP_TESTS)
 
   FOREACH(_test ${_tests})
 
-    GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
+    IF( "${DEAL_II_PICKUP_REGEX}" STREQUAL "" OR
+        _test MATCHES "${DEAL_II_PICKUP_REGEX}" )
+      GET_FILENAME_COMPONENT(_test ${_test} NAME_WE)
+
+      IF(_test MATCHES debug)
+        SET(_configuration DEBUG)
+      ELSEIF(_test MATCHES release)
+        SET(_configuration RELEASE)
+      ELSE()
+        SET(_configuration)
+      ENDIF()
 
-    IF(_test MATCHES debug)
-      SET(_configuration DEBUG)
-    ELSEIF(_test MATCHES release)
-      SET(_configuration RELEASE)
-    ELSE()
-      SET(_configuration)
+      STRING(REGEX REPLACE "\\..*" "." _test ${_test})
+      DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration})
     ENDIF()
 
-    STRING(REGEX REPLACE "\\..*" "." _test ${_test})
-    DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration})
   ENDFOREACH()
+
 ENDMACRO()

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.