From 21016600715c449edc1c4c184749df660fa8d359 Mon Sep 17 00:00:00 2001 From: maier Date: Sat, 26 Oct 2013 13:49:05 +0000 Subject: [PATCH] Testsuite: And finally get it right. git-svn-id: https://svn.dealii.org/trunk@31444 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/setup_custom_targets.cmake | 1 + deal.II/cmake/setup_testsuite.cmake | 4 ++-- deal.II/doc/developers/testsuite.html | 10 ++-------- deal.II/tests/CMakeLists.txt | 12 ++++++++++++ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/deal.II/cmake/setup_custom_targets.cmake b/deal.II/cmake/setup_custom_targets.cmake index 65399c645b..02e242c08d 100644 --- a/deal.II/cmake/setup_custom_targets.cmake +++ b/deal.II/cmake/setup_custom_targets.cmake @@ -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 # diff --git a/deal.II/cmake/setup_testsuite.cmake b/deal.II/cmake/setup_testsuite.cmake index baa864f49f..5aa5eb2718 100644 --- a/deal.II/cmake/setup_testsuite.cmake +++ b/deal.II/cmake/setup_testsuite.cmake @@ -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 "") diff --git a/deal.II/doc/developers/testsuite.html b/deal.II/doc/developers/testsuite.html index fc2e429c10..d6307a695c 100644 --- a/deal.II/doc/developers/testsuite.html +++ b/deal.II/doc/developers/testsuite.html @@ -156,6 +156,8 @@ Setup can be fine-tuned using the following commands:
 
+    $ 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
@@ -187,14 +189,6 @@
       

-

- Note: 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 - make prune_tests. -

-

Running the testsuite

diff --git a/deal.II/tests/CMakeLists.txt b/deal.II/tests/CMakeLists.txt index 0e193ebf69..4bd88c9a4b 100644 --- a/deal.II/tests/CMakeLists.txt +++ b/deal.II/tests/CMakeLists.txt @@ -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 -- 2.39.5