]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add support for test feature constraints
authorMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 6 Sep 2013 00:38:07 +0000 (00:38 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Fri, 6 Sep 2013 00:38:07 +0000 (00:38 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30614 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake

index 401b415a2b4ff892ef697ede4dcae8fbc6d8f522..3342bc92a468a496de3311c6774f23ec554d6c25 100644 (file)
@@ -31,10 +31,36 @@ MACRO(DEAL_II_PICKUP_TESTS)
 
   FOREACH(_test ${_tests})
 
+    #
+    # Respect TEST_PICKUP_REGEX: Make sure we are allowed to pickup this
+    # test:
+    #
     IF( "${TEST_PICKUP_REGEX}" STREQUAL "" OR
         _test MATCHES "${TEST_PICKUP_REGEX}" )
       GET_FILENAME_COMPONENT(_test ${_test} NAME)
+      SET(_define_test TRUE)
+    ELSE()
+      SET(_define_test FALSE)
+    ENDIF()
+
+    #
+    # Query configuration and check whether we support it. Otherwise do
+    # not define test:
+    #
+    STRING(REGEX MATCHALL "WITH_([0-9]|[A-Z]|_)*=(ON|OFF)" _matches ${_test})
+    FOREACH(_match ${_matches})
+      STRING(REGEX REPLACE "^(WITH_([0-9]|[A-Z]|_)*)=(ON|OFF)$" "\\1"
+        _feature ${_match}
+        )
+      STRING(REGEX MATCH "(ON|OFF)$" _boolean ${_match})
+
+      IF( (DEAL_II_${_feature} AND NOT ${_boolean}) OR
+          (NOT DEAL_II_${_feature} AND ${_boolean}) )
+        SET(_define_test FALSE)
+      ENDIF()
+    ENDFOREACH()
 
+    IF(_define_test)
       #
       # TODO: mpirun support
       #

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.