]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: And finally get it right.
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sat, 26 Oct 2013 13:49:05 +0000 (13:49 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sat, 26 Oct 2013 13:49:05 +0000 (13:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@31444 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/setup_custom_targets.cmake
deal.II/cmake/setup_testsuite.cmake
deal.II/doc/developers/testsuite.html
deal.II/tests/CMakeLists.txt

index 65399c645bc0adc30dd795f281702754f138565e..02e242c08dc7371971320e35027ce7aab718a036 100644 (file)
@@ -89,6 +89,7 @@ FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/print_info.cmake
 #    test           - runs a minimal set of tests
 #
 #    setup_tests    - sets up the testsuite subprojects
+#    regen_tests    - rerun configure stage in every testsuite subprojects
 #    clean_tests    - runs the 'clean' target in every testsuite subproject
 #    prune_tests    - removes all testsuite subprojects
 #
index baa864f49f8a5e3108b60725d5b7339e42e335c4..5aa5eb27187166d391127777457393ef40c69c2d 100644 (file)
@@ -53,8 +53,8 @@ FOREACH(_var
   TEST_PICKUP_REGEX
   TEST_OVERRIDE_LOCATION
   )
-  IF(NOT "$ENV{${_var}}" STREQUAL "")
-    # Environment always wins:
+  # Environment wins:
+  IF(DEFINED ENV{${_var}})
     SET(${_var} $ENV{${_var}})
   ENDIF()
   IF(NOT "${_var}" STREQUAL "")
index fc2e429c10f7893d683eb6ceb3a678134df1dd88..d6307a695c1ffab14a2a2f284fd28009c5aa56d0 100644 (file)
       Setup can be fine-tuned using the following commands:
       <pre>
 
+    $ make regen_tests - reruns configure stage in every testsuite subproject
+
     $ make clean_tests - runs the 'clean' target in every testsuite subproject
 
     $ make prune_tests - removes all testsuite subprojects
       </pre>
     </p>
 
-    <p>
-      <b>Note:</b> The subprojects cache these options (regardless of set
-      via environment variables or as cmake variable). So, if you want to
-      disable an option again, you have to either explicitly set it to an
-      empty string or first remove the subprojects via
-      <code>make prune_tests</code>.
-    </p>
-
     <a name="run"></a>
     <h2>Running the testsuite</h2>
 
index 0e193ebf69fc631ca93ef0508e55196cdbe08e5e..4bd88c9a4bfa3ab104966063fa5cbec4176b12c3 100644 (file)
@@ -32,6 +32,9 @@ ADD_SUBDIRECTORY(quick_tests)
 # Setup tests:
 ADD_CUSTOM_TARGET(setup_tests)
 
+# Regenerate tests (run "make rebuild_cache" in subprojects):
+ADD_CUSTOM_TARGET(regen_tests)
+
 # Clean all tests
 ADD_CUSTOM_TARGET(clean_tests)
 
@@ -60,6 +63,8 @@ FOREACH(_var
     TEST_PICKUP_REGEX
     TEST_TIME_LIMIT
     )
+  # always undefine:
+  LIST(APPEND _options "-U${_var}")
   IF(DEFINED ${_var})
     LIST(APPEND _options "-D${_var}=${${_var}}")
   ENDIF()
@@ -104,6 +109,13 @@ FOREACH(_category ${_categories})
     # depend on a valid build directory:
     ADD_DEPENDENCIES(setup_tests_${_category} setup_build_dir)
 
+    ADD_CUSTOM_TARGET(regen_tests_${_category}
+      COMMAND [ ! -d ${_category} ] || ${CMAKE_COMMAND}
+        --build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target regenerate
+        > /dev/null # Shoo!
+      )
+    ADD_DEPENDENCIES(regen_tests regen_tests_${_category})
+
     ADD_CUSTOM_TARGET(clean_tests_${_category}
       COMMAND [ ! -d ${_category} ] || ${CMAKE_COMMAND}
         --build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target clean

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.