]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: Refactor testsuite setup into its own project.
authorMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 20 Nov 2013 15:41:51 +0000 (15:41 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Wed, 20 Nov 2013 15:41:51 +0000 (15:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@31728 0785d39b-7218-0410-832d-ea1e28bc413d

33 files changed:
deal.II/CMakeLists.txt
deal.II/cmake/scripts/run_testsuite.cmake
deal.II/cmake/setup_testsubproject.cmake [new file with mode: 0644]
deal.II/cmake/setup_testsuite.cmake
deal.II/doc/developers/testsuite.html
deal.II/tests/CMakeLists.txt
deal.II/tests/all-headers/CMakeLists.txt
deal.II/tests/build_tests/CMakeLists.txt
deal.II/tests/mesh_converter/CMakeLists.txt
tests/CMakeLists.txt
tests/a-framework/CMakeLists.txt
tests/aniso/CMakeLists.txt
tests/base/CMakeLists.txt
tests/bits/CMakeLists.txt
tests/codim_one/CMakeLists.txt
tests/deal.II/CMakeLists.txt
tests/distributed_grids/CMakeLists.txt
tests/fe/CMakeLists.txt
tests/gla/CMakeLists.txt
tests/grid/CMakeLists.txt
tests/hp/CMakeLists.txt
tests/integrators/CMakeLists.txt
tests/lac/CMakeLists.txt
tests/lapack/CMakeLists.txt
tests/matrix_free/CMakeLists.txt
tests/metis/CMakeLists.txt
tests/mpi/CMakeLists.txt
tests/multigrid/CMakeLists.txt
tests/petsc/CMakeLists.txt
tests/serialization/CMakeLists.txt
tests/slepc/CMakeLists.txt
tests/trilinos/CMakeLists.txt
tests/umfpack/CMakeLists.txt

index c5e09474bc4cb9d003a5b4ea4c4f572fa261ab04..4caaebe4c88b007a0a9a93aa5b0c57b26b5b8168 100644 (file)
@@ -145,7 +145,7 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source
 ADD_SUBDIRECTORY(contrib) # has to be included after source
 ADD_SUBDIRECTORY(examples)
 
-ADD_SUBDIRECTORY(tests)
+INCLUDE(setup_testsuite)
 
 #
 # And finally, print the configuration:
index 6e7e1c1d99405605c7cb22277be3449a6d4d70c0..f835123a1c074e1f6aa8868a559de722352e92e6 100644 (file)
@@ -86,6 +86,9 @@
 #     CTEST_COVERAGE() stage will be run. Test results must go into the
 #     "Experimental" section.
 #
+#   MAKEOPTS
+#     - Additional options that will be passed directly to make (or ninja).
+#
 # Furthermore, the following variables controlling the testsuite can be set
 # and will be automatically handed down to cmake:
 #
@@ -254,6 +257,10 @@ ENDIF()
 # Assemble configuration options, we need it now:
 #
 
+IF("${MAKEOPTS}" STREQUAL "")
+  SET(MAKEOPTS $ENV{MAKEOPTS})
+ENDIF()
+
 IF(NOT "${CONFIG_FILE}" STREQUAL "")
   SET(_options "-C${CONFIG_FILE}")
 ENDIF()
@@ -272,6 +279,7 @@ FOREACH(_var ${_variables})
       _var MATCHES "^(UMFPACK|ZLIB|LAPACK)_" OR
       _var MATCHES "^(CMAKE|DEAL_II)_(C|CXX|Fortran|BUILD)_(COMPILER|FLAGS)" OR
       _var MATCHES "^CMAKE_BUILD_TYPE$" OR
+      _var MATCHES "MAKEOPTS" OR
       ( NOT _var MATCHES "^[_]*CMAKE" AND _var MATCHES "_DIR$" ) )
     LIST(APPEND _options "-D${_var}=${${_var}}")
   ENDIF()
@@ -500,7 +508,11 @@ MACRO(CLEAR_TARGETDIRECTORIES_TXT)
     )
 ENDMACRO()
 
-MESSAGE("-- CMake Options: ${_options}")
+MESSAGE("-- CMake Options:          ${_options}")
+
+IF(NOT "${MAKEOPTS}" STREQUAL "")
+  MESSAGE("-- MAKEOPTS:               ${MAKEOPTS}")
+ENDIF()
 
 
 ########################################################################
@@ -522,7 +534,7 @@ IF("${_res}" STREQUAL "0")
   # Only run the build stage if configure was successful:
 
   MESSAGE("-- Running CTEST_BUILD()")
-  CTEST_BUILD(TARGET NUMBER_ERRORS _res)
+  CTEST_BUILD(TARGET ${MAKEOPTS} NUMBER_ERRORS _res)
 
   IF("${_res}" STREQUAL "0")
     # Only run tests if the build was successful:
@@ -530,6 +542,7 @@ IF("${_res}" STREQUAL "0")
     MESSAGE("-- Running make setup_tests")
     EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
       --build ${CTEST_BINARY_DIRECTORY} --target setup_tests
+      -- ${MAKEOPTS}
       OUTPUT_QUIET RESULT_VARIABLE _res
       )
     IF(NOT "${_res}" STREQUAL "0")
diff --git a/deal.II/cmake/setup_testsubproject.cmake b/deal.II/cmake/setup_testsubproject.cmake
new file mode 100644 (file)
index 0000000..e40a167
--- /dev/null
@@ -0,0 +1,128 @@
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# Setup necessary configuration in the testsuite subprojects.
+# This file is directly included by the test subprojects and not by the
+# main project.
+#
+# It is assumed that the following variables are set:
+#
+#    DEAL_II_BINARY_DIR
+#    DEAL_II_SOURCE_DIR
+#      - pointing to a source and binary directory of a deal.II build
+#
+# This file sets up the following options, that can be overwritten by
+# environment or command line:
+#
+#     TEST_DIFF
+#     TEST_OVERRIDE_LOCATION
+#     TEST_PICKUP_REGEX
+#     TEST_TIME_LIMIT
+#
+
+#
+# Load all macros:
+#
+FILE(GLOB _macro_files ${DEAL_II_SOURCE_DIR}/cmake/macros/*.cmake)
+FOREACH(_file ${_macro_files})
+  INCLUDE(${_file})
+ENDFOREACH()
+
+#
+# Pick up values from environment:
+#
+FOREACH(_var
+  DEAL_II_BINARY_DIR
+  DEAL_II_SOURCE_DIR
+  TEST_DIFF
+  TEST_TIME_LIMIT
+  TEST_PICKUP_REGEX
+  TEST_OVERRIDE_LOCATION
+  )
+  # Environment wins:
+  IF(DEFINED ENV{${_var}})
+    SET(${_var} $ENV{${_var}})
+  ENDIF()
+  IF(NOT "${_var}" STREQUAL "")
+    SET(${_var} "${${_var}}" CACHE STRING "")
+  ENDIF()
+ENDFOREACH()
+
+#
+# We need deal.II and Perl as external packages:
+#
+
+FIND_PACKAGE(deal.II 8.0 REQUIRED
+  HINTS ${DEAL_II_BINARY_DIR} ${DEAL_II_DIR}
+  )
+SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING "CXX Compiler.")
+
+FIND_PACKAGE(Perl REQUIRED)
+
+#
+# We need a diff tool, preferably numdiff:
+#
+
+FIND_PROGRAM(DIFF_EXECUTABLE
+  NAMES diff
+  HINTS ${DIFF_DIR}
+  PATH_SUFFIXES bin
+  )
+
+FIND_PROGRAM(NUMDIFF_EXECUTABLE
+  NAMES numdiff
+  HINTS ${NUMDIFF_DIR}
+  PATH_SUFFIXES bin
+  )
+
+MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE)
+
+IF("${TEST_DIFF}" STREQUAL "")
+  #
+  # No TEST_DIFF is set, specify one:
+  #
+
+  IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND")
+    SET(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -r 1e-8 -s ' \\t\\n:')
+  ELSEIF(NOT DIFF_EXECUTABLE MATCHES "-NOTFOUND")
+    SET(TEST_DIFF ${DIFF_EXECUTABLE})
+  ELSE()
+    MESSAGE(FATAL_ERROR
+      "Could not find diff or numdiff. One of those are required for running the testsuite.\n"
+      "Please specify TEST_DIFF by hand."
+      )
+  ENDIF()
+ENDIF()
+
+#
+# Set a default time limit of 600 seconds:
+#
+
+SET_IF_EMPTY(TEST_TIME_LIMIT 600)
+
+#
+# And finally, enable testing:
+#
+
+ENABLE_TESTING()
+
+#
+# A custom target that does absolutely nothing. It is used in the main
+# project to trigger a "make rebuild_cache" if necessary.
+#
+
+ADD_CUSTOM_TARGET(regenerate)
index e40a16751700f65e930f1ed370307c5cbf864f17..fc2e87337950e7c17e82049a5d0ba65632e78987 100644 (file)
 ## ---------------------------------------------------------------------
 
 #
-# Setup necessary configuration in the testsuite subprojects.
-# This file is directly included by the test subprojects and not by the
-# main project.
-#
-# It is assumed that the following variables are set:
-#
-#    DEAL_II_BINARY_DIR
-#    DEAL_II_SOURCE_DIR
-#      - pointing to a source and binary directory of a deal.II build
-#
-# This file sets up the following options, that can be overwritten by
-# environment or command line:
-#
-#     TEST_DIFF
-#     TEST_OVERRIDE_LOCATION
-#     TEST_PICKUP_REGEX
-#     TEST_TIME_LIMIT
+# Setup the testsuite. The top level targets defined here merely act as a
+# multiplexer for the ./tets/ project where all the actual work is
+# done...
 #
 
-#
-# Load all macros:
-#
-FILE(GLOB _macro_files ${DEAL_II_SOURCE_DIR}/cmake/macros/*.cmake)
-FOREACH(_file ${_macro_files})
-  INCLUDE(${_file})
-ENDFOREACH()
+SET_IF_EMPTY(MAKEOPTS $ENV{MAKEOPTS})
 
-#
-# Pick up values from environment:
-#
-FOREACH(_var
-  DEAL_II_BINARY_DIR
-  DEAL_II_SOURCE_DIR
-  TEST_DIFF
-  TEST_TIME_LIMIT
-  TEST_PICKUP_REGEX
-  TEST_OVERRIDE_LOCATION
+MESSAGE(STATUS "")
+MESSAGE(STATUS "Setup testsuite with TEST_DIR ${TEST_DIR}")
+
+ADD_SUBDIRECTORY(
+  ${CMAKE_SOURCE_DIR}/tests/quick_tests
+  ${CMAKE_BINARY_DIR}/tests/quick_tests
   )
-  # Environment wins:
-  IF(DEFINED ENV{${_var}})
-    SET(${_var} $ENV{${_var}})
-  ENDIF()
-  IF(NOT "${_var}" STREQUAL "")
-    SET(${_var} "${${_var}}" CACHE STRING "")
-  ENDIF()
-ENDFOREACH()
 
 #
-# We need deal.II and Perl as external packages:
+# Write a minimalistic CTestTestfile.cmake file to CMAKE_BINARY_DIR and
+# CMAKE_BINARY_DIR/tests:
 #
 
-FIND_PACKAGE(deal.II 8.0 REQUIRED
-  HINTS ${DEAL_II_BINARY_DIR} ${DEAL_II_DIR}
+FILE(WRITE ${CMAKE_BINARY_DIR}/CTestTestfile.cmake
+  "SUBDIRS(tests)"
   )
-SET(CMAKE_CXX_COMPILER ${DEAL_II_CXX_COMPILER} CACHE STRING "CXX Compiler.")
 
-FIND_PACKAGE(Perl REQUIRED)
+FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tests)
+FILE(WRITE ${CMAKE_BINARY_DIR}/tests/CTestTestfile.cmake "")
 
 #
-# We need a diff tool, preferably numdiff:
+# Custom targets to set and clean up the testsuite:
 #
 
-FIND_PROGRAM(DIFF_EXECUTABLE
-  NAMES diff
-  HINTS ${DIFF_DIR}
-  PATH_SUFFIXES bin
+# Setup tests:
+ADD_CUSTOM_TARGET(setup_tests
+  COMMAND ${CMAKE_COMMAND}
+    --build ${CMAKE_BINARY_DIR}/tests --target setup_tests
+    -- ${MAKEOPTS}
   )
 
-FIND_PROGRAM(NUMDIFF_EXECUTABLE
-  NAMES numdiff
-  HINTS ${NUMDIFF_DIR}
-  PATH_SUFFIXES bin
-  )
+# Depend on a compiled library:
+ADD_DEPENDENCIES(setup_tests build_library)
 
-MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE)
-
-IF("${TEST_DIFF}" STREQUAL "")
-  #
-  # No TEST_DIFF is set, specify one:
-  #
-
-  IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND")
-    SET(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -r 1e-8 -s ' \\t\\n:')
-  ELSEIF(NOT DIFF_EXECUTABLE MATCHES "-NOTFOUND")
-    SET(TEST_DIFF ${DIFF_EXECUTABLE})
-  ELSE()
-    MESSAGE(FATAL_ERROR
-      "Could not find diff or numdiff. One of those are required for running the testsuite.\n"
-      "Please specify TEST_DIFF by hand."
-      )
-  ENDIF()
-ENDIF()
+# Regenerate tests (run "make rebuild_cache" in subprojects):
+ADD_CUSTOM_TARGET(regen_tests
+  COMMAND ${CMAKE_COMMAND}
+    --build ${CMAKE_BINARY_DIR}/tests --target regen_tests
+    -- ${MAKEOPTS}
+  )
 
-#
-# Set a default time limit of 600 seconds:
-#
+# Clean all tests
+ADD_CUSTOM_TARGET(clean_tests
+  COMMAND ${CMAKE_COMMAND}
+    --build ${CMAKE_BINARY_DIR}/tests --target clean_tests
+    -- ${MAKEOPTS}
+  )
 
-SET_IF_EMPTY(TEST_TIME_LIMIT 600)
+# Remove all tests:
+ADD_CUSTOM_TARGET(prune_tests
+  COMMAND ${CMAKE_COMMAND}
+    --build ${CMAKE_BINARY_DIR}/tests --target prune_tests
+    -- ${MAKEOPTS}
+  )
 
 #
-# And finally, enable testing:
+# Setup the testsuite and pass all relevant "TEST_" and "_DIR" variables
+# down to it:
 #
 
-ENABLE_TESTING()
+MESSAGE(STATUS "Setup testsuite")
 
-#
-# A custom target that does absolutely nothing. It is used in the main
-# project to trigger a "make rebuild_cache" if necessary.
-#
+SET(_options)
+LIST(APPEND _options -DDEAL_II_SOURCE_DIR=${CMAKE_SOURCE_DIR})
+LIST(APPEND _options -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR})
+FOREACH(_var
+    DIFF_DIR NUMDIFF_DIR TEST_DIR TEST_DIFF TEST_OVERRIDE_LOCATION
+    TEST_PICKUP_REGEX TEST_TIME_LIMIT
+    )
+  # always undefine:
+  LIST(APPEND _options "-U${_var}")
+  IF(DEFINED ${_var})
+    LIST(APPEND _options "-D${_var}=${${_var}}")
+  ENDIF()
+ENDFOREACH()
 
-ADD_CUSTOM_TARGET(regenerate)
+EXECUTE_PROCESS(
+  COMMAND ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_options}
+    ${CMAKE_SOURCE_DIR}/tests
+  WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tests
+  OUTPUT_QUIET
+  )
+MESSAGE(STATUS "Setup testsuite - Done")
+
+MESSAGE(STATUS "Regenerating testsuite subprojects")
+EXECUTE_PROCESS(
+  COMMAND ${CMAKE_COMMAND}
+    --build ${CMAKE_BINARY_DIR}/tests --target regen_tests
+    -- ${MAKEOPTS}
+  OUTPUT_QUIET
+  )
+MESSAGE(STATUS "Regenerating testsuite subprojects - Done")
+MESSAGE(STATUS "")
index 3ad09b31d703007478c758a209b98c6c75323de8..a77a74b0141d605bd7191fe55a45c012f11c223a 100644 (file)
@@ -55,6 +55,7 @@
         <li><a href="#run">Running the testsuite</a></li>
         <ol>
           <li><a href="#runoutput">How to interpret the output</a></li>
+          <li><a href="#runmakeopts">Parallelize testsuite configuration</a></li>
         </ol>
         <li><a href="#layout">Testsuite development</a></li>
         <ol>
     </p>
 
 
+    <a name="runmakeopts"></a>
+    <h3>Parallelize testsuite configuration</h3>
+
+    <p>
+      If you have set up a good portion of the testsuite you'll notice that a
+      reconfiguration of the build directory takes a noticeable time (in the
+      order of minutes instead of seconds) with
+      <code>Reconfiguring testsuite subprojects</code>.
+      By default (with the "Unix Makefiles" generator) this is due to the
+      fact that the reconfiguration processes the subprojects sequentally.
+      If you want to increase the parallelism, specify e.g.
+      <code>MAKEOPTS="-j8"</code> as environment variable or as CMake
+      variable.
+    </p>
+    <p>
+      Alternatively, you can use <code>Ninja</code>.
+    </p>
+
+
+
     <a name="layout"></a>
     <h2>Testsuite development</h2>
 
@@ -696,7 +717,7 @@ int main ()
     <pre>
 
     CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-    INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+    INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
     PROJECT(testsuite CXX)
     INCLUDE(${DEAL_II_TARGET_CONFIG})
     DEAL_II_PICKUP_TESTS()
@@ -780,6 +801,9 @@ int main ()
         that will be used during the configuration stage (invokes
         $ cmake -C ${CONFIG_FILE}). This only has an effect if
         CTEST_BINARY_DIRECTORY is empty.
+
+    MAKEOPTS
+      - Additional options that will be passed directly to make (or ninja).
       </pre>
       Furthermore, the variables described <a href="#setupconfigure">above</a> can also be
       set and will be handed automatically down to <code>cmake</code>.
index 74a5cfa2f5803df01ebe3dcc86b1d9d1590f5d5f..8b6a8036785d0c96b5f860947125ef304c9ff40b 100644 (file)
 ##
 ## ---------------------------------------------------------------------
 
+IF(NOT DEFINED DEAL_II_SOURCE_DIR OR NOT DEFINED DEAL_II_BINARY_DIR)
+  MESSAGE(FATAL_ERROR "\n
+  The testsuite cannot be set up as an independent project.
+  Please configure \"deal.II\" directly instead.\n\n"
+    )
+ENDIF()
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+PROJECT(testsuite NONE)
+
 #
 # This is a bloody hack to avoid a severe performance penalty when using
 # 12k top level targets with GNU Make that really does not like that...
 # The only choice we have is to set up every test subdirectory as an
 # independent project. Unfortunately this adds quite a significant amount
 # of complexity :-(
-#
-
-MESSAGE(STATUS "")
-MESSAGE(STATUS "Setup testsuite with TEST_DIR ${TEST_DIR}")
-ADD_SUBDIRECTORY(quick_tests)
 
 #
 # Custom targets to set and clean up the testsuite:
@@ -44,27 +49,23 @@ ADD_CUSTOM_TARGET(clean_tests)
 ADD_CUSTOM_TARGET(prune_tests)
 
 #
-# Write a minimalistic CTestTestfile.cmake file to CMAKE_BINARY_DIR and
-# CMAKE_CURRENT_BINARY_DIR:
+# Be as quiet as possible:
 #
-FILE(WRITE ${CMAKE_BINARY_DIR}/CTestTestfile.cmake
-  "SUBDIRS(tests)"
-  )
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfile.cmake "")
+
+IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
+  SET(_shoo)
+ELSE()
+  SET(_shoo >/dev/null)
+ENDIF()
 
 #
-# Pass all relevant "TEST_" and "_DIR" variables down to the subprojects:
+# Pass down all relevant configuration:
 #
+
 SET(_options)
-LIST(APPEND _options -DDEAL_II_SOURCE_DIR=${CMAKE_SOURCE_DIR})
-LIST(APPEND _options -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR})
 FOREACH(_var
-    DIFF_DIR
-    NUMDIFF_DIR
-    TEST_DIFF
-    TEST_OVERRIDE_LOCATION
-    TEST_PICKUP_REGEX
-    TEST_TIME_LIMIT
+    DEAL_II_SOURCE_DIR DEAL_II_BINARY_DIR DIFF_DIR NUMDIFF_DIR
+    TEST_DIFF TEST_OVERRIDE_LOCATION TEST_PICKUP_REGEX TEST_TIME_LIMIT
     )
   # always undefine:
   LIST(APPEND _options "-U${_var}")
@@ -73,16 +74,10 @@ FOREACH(_var
   ENDIF()
 ENDFOREACH()
 
-# Be as quiet as possible:
-IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
-  SET(_shoo)
-ELSE()
-  SET(_shoo >/dev/null)
-ENDIF()
-
 #
 # Glob together a list of all subfolders to set up:
 #
+
 FILE(GLOB _categories RELATIVE ${TEST_DIR} ${TEST_DIR}/*)
 SET(_categories all-headers build_tests mesh_converter ${_categories})
 LIST(REMOVE_DUPLICATES _categories)
@@ -91,11 +86,9 @@ LIST(REMOVE_DUPLICATES _categories)
 # Define a subproject for every enabled category:
 #
 
-MESSAGE(STATUS "Regenerating testsuite subprojects")
-
 FOREACH(_category ${_categories})
-  IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_category}/CMakeLists.txt)
-    SET(_category_dir ${CMAKE_CURRENT_SOURCE_DIR}/${_category})
+  IF(EXISTS ${CMAKE_SOURCE_DIR}/${_category}/CMakeLists.txt)
+    SET(_category_dir ${CMAKE_SOURCE_DIR}/${_category})
   ELSEIF(EXISTS ${TEST_DIR}/${_category}/CMakeLists.txt)
     SET(_category_dir ${TEST_DIR}/${_category})
   ELSE()
@@ -106,8 +99,8 @@ FOREACH(_category ${_categories})
 
     ADD_CUSTOM_TARGET(setup_tests_${_category}
       COMMAND ${CMAKE_COMMAND} -E make_directory
-        ${CMAKE_CURRENT_BINARY_DIR}/${_category}
-      COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/${_category} &&
+        ${CMAKE_BINARY_DIR}/${_category}
+      COMMAND cd ${CMAKE_BINARY_DIR}/${_category} &&
         ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_options} ${_category_dir}
         ${_shoo}
       DEPENDS ${_category_dir}
@@ -115,51 +108,30 @@ FOREACH(_category ${_categories})
       )
     ADD_DEPENDENCIES(setup_tests setup_tests_${_category})
 
-    # depend on a compiled library:
-    ADD_DEPENDENCIES(setup_tests_${_category} build_library)
-
     ADD_CUSTOM_TARGET(regen_tests_${_category}
       COMMAND [ ! -d ${_category} ] || ${CMAKE_COMMAND}
-        --build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target regenerate
+        --build ${CMAKE_BINARY_DIR}/${_category} --target regenerate
         ${_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
+        --build ${CMAKE_BINARY_DIR}/${_category} --target clean
         ${_shoo}
       )
     ADD_DEPENDENCIES(clean_tests clean_tests_${_category})
 
     ADD_CUSTOM_TARGET(prune_tests_${_category}
       COMMAND ${CMAKE_COMMAND} -E remove_directory
-        ${CMAKE_CURRENT_BINARY_DIR}/${_category}
+        ${CMAKE_BINARY_DIR}/${_category}
       )
     ADD_DEPENDENCIES(prune_tests prune_tests_${_category})
 
-    FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfile.cmake
+    FILE(APPEND ${CMAKE_BINARY_DIR}/CTestTestfile.cmake
       "SUBDIRS(${_category})\n"
       )
 
-    #
-    # Regenerate subprojects: The "regenerate" target of the subproject
-    # depends on "rebuild_cache" so that the subprojects rerun cmake if
-    # necessary.
-    # (TODO: Unfortunately this is sequential - due to the fact that we
-    # cannot call back into the main build system)
-    #
-
-    IF(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/${_category}/CMakeCache.txt)
-      EXECUTE_PROCESS(
-        COMMAND ${CMAKE_COMMAND}
-        --build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target regenerate
-        OUTPUT_QUIET
-        )
-    ENDIF()
-
   ENDIF()
 ENDFOREACH()
 
-MESSAGE(STATUS "Regenerating testsuite subprojects - Done")
-MESSAGE(STATUS "")
index f1aa8509a7ec46407a5db08ce20ac34dfab0d3af..175e078ed875ff4bb0d729208d61e2f1a301ca52 100644 (file)
@@ -15,7 +15,7 @@
 ## ---------------------------------------------------------------------
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 
index 8847d559e971cffce1502b6931a1a0bbaad27a6e..02318b6259a54fbf829ef9e398a5465314110b0d 100644 (file)
@@ -15,7 +15,7 @@
 ## ---------------------------------------------------------------------
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 
index 63df32137896e78522779dc912bd827657ed7814..0bac004ae8fdabf44b7664f0488f04e79a2efef6 100644 (file)
@@ -15,7 +15,7 @@
 ## ---------------------------------------------------------------------
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 
index 15b4d9ad0cd5fbef70b909f3245868d5cbb4cb0c..b1ad22bf6397a4180872fe7557e9e2e428fd2504 100644 (file)
@@ -1,3 +1,6 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+PROJECT(TESTSUITE NONE)
+
 MESSAGE(FATAL_ERROR "\n
 The testsuite cannot be set up as an independent project.
 Please configure \"deal.II\" directly instead.\n\n"
index 2077b01d03db3671d7a6a941e987eb13b6a9cce0..c2ca3dd75d5b54919e0407d87e607aad21c1e6ae 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e1ba866f7edc5981b6034aa816b338aa1a768813..baeb270640f0c5eee55001a4e5f93073db2f4977 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_P4EST)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index ef84a0b38692feb3d496ef5e4626a2f25f8519e7..e8f4a01f4adc8dd3c8853e19a0fc2ccde127ed09 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 13d07cf2c3f22a1488fbd9474080a0b518a6e75e..8887f4f83007f7544c536638b00e0d3df3ec346f 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_LAPACK)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 3219ef35aa26b63255fc1ad0c9b320ea43e1c312..e45e9f2adbe37c754b8b25f578443b0aaacabb51 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_METIS)
index ef84a0b38692feb3d496ef5e4626a2f25f8519e7..e8f4a01f4adc8dd3c8853e19a0fc2ccde127ed09 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 5afa661fa1aebe266dbb35074ae235e6bb7bb4aa..840a460b100dd8e5a4b237c8430ce59061c86084 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_PETSC)
index e39c51b85d2fa39981f342cb7b34ad9e3e6e2830..ffa6bb54a1ca95a36874f9718cd24d23bce17da2 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 DEAL_II_PICKUP_TESTS()
index 27b6959af2275eae22773794a456d988c91723d7..93e938146c753c0d4295d5d62cce32750bddb816 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF((DEAL_II_WITH_PETSC) AND (DEAL_II_WITH_SLEPC))
index 862d6a1f5ed228c7e94ee15ec8be77ec56376149..9bd93d7f1384282502872aa69d31e21ad01bab97 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_TRILINOS)
index 70aca765fff7bb7027030deebbd636e7723d659a..994c98b39baa0fce55e033878996a226c5ea63e1 100644 (file)
@@ -1,5 +1,5 @@
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsubproject.cmake)
 PROJECT(testsuite CXX)
 INCLUDE(${DEAL_II_TARGET_CONFIG})
 IF(DEAL_II_WITH_UMFPACK)

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.