From: Matthias Maier Date: Wed, 20 Nov 2013 15:41:51 +0000 (+0000) Subject: Testsuite: Refactor testsuite setup into its own project. X-Git-Tag: v8.1.0~233 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29622740867b842b270ae9ab99b492125960cec8;p=dealii.git Testsuite: Refactor testsuite setup into its own project. git-svn-id: https://svn.dealii.org/trunk@31728 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/CMakeLists.txt b/deal.II/CMakeLists.txt index c5e09474bc..4caaebe4c8 100644 --- a/deal.II/CMakeLists.txt +++ b/deal.II/CMakeLists.txt @@ -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: diff --git a/deal.II/cmake/scripts/run_testsuite.cmake b/deal.II/cmake/scripts/run_testsuite.cmake index 6e7e1c1d99..f835123a1c 100644 --- a/deal.II/cmake/scripts/run_testsuite.cmake +++ b/deal.II/cmake/scripts/run_testsuite.cmake @@ -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 index 0000000000..e40a167517 --- /dev/null +++ b/deal.II/cmake/setup_testsubproject.cmake @@ -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) diff --git a/deal.II/cmake/setup_testsuite.cmake b/deal.II/cmake/setup_testsuite.cmake index e40a167517..fc2e873379 100644 --- a/deal.II/cmake/setup_testsuite.cmake +++ b/deal.II/cmake/setup_testsuite.cmake @@ -15,114 +15,103 @@ ## --------------------------------------------------------------------- # -# 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 "") diff --git a/deal.II/doc/developers/testsuite.html b/deal.II/doc/developers/testsuite.html index 3ad09b31d7..a77a74b014 100644 --- a/deal.II/doc/developers/testsuite.html +++ b/deal.II/doc/developers/testsuite.html @@ -55,6 +55,7 @@
  • Running the testsuite
    1. How to interpret the output
    2. +
    3. Parallelize testsuite configuration
  • Testsuite development
    1. @@ -349,6 +350,26 @@

      + +

      Parallelize testsuite configuration

      + +

      + 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 + Reconfiguring testsuite subprojects. + 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. + MAKEOPTS="-j8" as environment variable or as CMake + variable. +

      +

      + Alternatively, you can use Ninja. +

      + + +

      Testsuite development

      @@ -696,7 +717,7 @@ int main ()
       
           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).
             
      Furthermore, the variables described above can also be set and will be handed automatically down to cmake. diff --git a/deal.II/tests/CMakeLists.txt b/deal.II/tests/CMakeLists.txt index 74a5cfa2f5..8b6a803678 100644 --- a/deal.II/tests/CMakeLists.txt +++ b/deal.II/tests/CMakeLists.txt @@ -14,6 +14,16 @@ ## ## --------------------------------------------------------------------- +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... @@ -21,11 +31,6 @@ # 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 "") diff --git a/deal.II/tests/all-headers/CMakeLists.txt b/deal.II/tests/all-headers/CMakeLists.txt index f1aa8509a7..175e078ed8 100644 --- a/deal.II/tests/all-headers/CMakeLists.txt +++ b/deal.II/tests/all-headers/CMakeLists.txt @@ -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}) diff --git a/deal.II/tests/build_tests/CMakeLists.txt b/deal.II/tests/build_tests/CMakeLists.txt index 8847d559e9..02318b6259 100644 --- a/deal.II/tests/build_tests/CMakeLists.txt +++ b/deal.II/tests/build_tests/CMakeLists.txt @@ -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}) diff --git a/deal.II/tests/mesh_converter/CMakeLists.txt b/deal.II/tests/mesh_converter/CMakeLists.txt index 63df321378..0bac004ae8 100644 --- a/deal.II/tests/mesh_converter/CMakeLists.txt +++ b/deal.II/tests/mesh_converter/CMakeLists.txt @@ -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}) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 15b4d9ad0c..b1ad22bf63 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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" diff --git a/tests/a-framework/CMakeLists.txt b/tests/a-framework/CMakeLists.txt index 2077b01d03..c2ca3dd75d 100644 --- a/tests/a-framework/CMakeLists.txt +++ b/tests/a-framework/CMakeLists.txt @@ -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() diff --git a/tests/aniso/CMakeLists.txt b/tests/aniso/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/aniso/CMakeLists.txt +++ b/tests/aniso/CMakeLists.txt @@ -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() diff --git a/tests/base/CMakeLists.txt b/tests/base/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/base/CMakeLists.txt +++ b/tests/base/CMakeLists.txt @@ -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() diff --git a/tests/bits/CMakeLists.txt b/tests/bits/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/bits/CMakeLists.txt +++ b/tests/bits/CMakeLists.txt @@ -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() diff --git a/tests/codim_one/CMakeLists.txt b/tests/codim_one/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/codim_one/CMakeLists.txt +++ b/tests/codim_one/CMakeLists.txt @@ -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() diff --git a/tests/deal.II/CMakeLists.txt b/tests/deal.II/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/deal.II/CMakeLists.txt +++ b/tests/deal.II/CMakeLists.txt @@ -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() diff --git a/tests/distributed_grids/CMakeLists.txt b/tests/distributed_grids/CMakeLists.txt index e1ba866f7e..baeb270640 100644 --- a/tests/distributed_grids/CMakeLists.txt +++ b/tests/distributed_grids/CMakeLists.txt @@ -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) diff --git a/tests/fe/CMakeLists.txt b/tests/fe/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/fe/CMakeLists.txt +++ b/tests/fe/CMakeLists.txt @@ -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() diff --git a/tests/gla/CMakeLists.txt b/tests/gla/CMakeLists.txt index ef84a0b386..e8f4a01f4a 100644 --- a/tests/gla/CMakeLists.txt +++ b/tests/gla/CMakeLists.txt @@ -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) diff --git a/tests/grid/CMakeLists.txt b/tests/grid/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/grid/CMakeLists.txt +++ b/tests/grid/CMakeLists.txt @@ -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() diff --git a/tests/hp/CMakeLists.txt b/tests/hp/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/hp/CMakeLists.txt +++ b/tests/hp/CMakeLists.txt @@ -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() diff --git a/tests/integrators/CMakeLists.txt b/tests/integrators/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/integrators/CMakeLists.txt +++ b/tests/integrators/CMakeLists.txt @@ -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() diff --git a/tests/lac/CMakeLists.txt b/tests/lac/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/lac/CMakeLists.txt +++ b/tests/lac/CMakeLists.txt @@ -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() diff --git a/tests/lapack/CMakeLists.txt b/tests/lapack/CMakeLists.txt index 13d07cf2c3..8887f4f830 100644 --- a/tests/lapack/CMakeLists.txt +++ b/tests/lapack/CMakeLists.txt @@ -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) diff --git a/tests/matrix_free/CMakeLists.txt b/tests/matrix_free/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/matrix_free/CMakeLists.txt +++ b/tests/matrix_free/CMakeLists.txt @@ -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() diff --git a/tests/metis/CMakeLists.txt b/tests/metis/CMakeLists.txt index 3219ef35aa..e45e9f2adb 100644 --- a/tests/metis/CMakeLists.txt +++ b/tests/metis/CMakeLists.txt @@ -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) diff --git a/tests/mpi/CMakeLists.txt b/tests/mpi/CMakeLists.txt index ef84a0b386..e8f4a01f4a 100644 --- a/tests/mpi/CMakeLists.txt +++ b/tests/mpi/CMakeLists.txt @@ -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) diff --git a/tests/multigrid/CMakeLists.txt b/tests/multigrid/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/multigrid/CMakeLists.txt +++ b/tests/multigrid/CMakeLists.txt @@ -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() diff --git a/tests/petsc/CMakeLists.txt b/tests/petsc/CMakeLists.txt index 5afa661fa1..840a460b10 100644 --- a/tests/petsc/CMakeLists.txt +++ b/tests/petsc/CMakeLists.txt @@ -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) diff --git a/tests/serialization/CMakeLists.txt b/tests/serialization/CMakeLists.txt index e39c51b85d..ffa6bb54a1 100644 --- a/tests/serialization/CMakeLists.txt +++ b/tests/serialization/CMakeLists.txt @@ -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() diff --git a/tests/slepc/CMakeLists.txt b/tests/slepc/CMakeLists.txt index 27b6959af2..93e938146c 100644 --- a/tests/slepc/CMakeLists.txt +++ b/tests/slepc/CMakeLists.txt @@ -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)) diff --git a/tests/trilinos/CMakeLists.txt b/tests/trilinos/CMakeLists.txt index 862d6a1f5e..9bd93d7f13 100644 --- a/tests/trilinos/CMakeLists.txt +++ b/tests/trilinos/CMakeLists.txt @@ -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) diff --git a/tests/umfpack/CMakeLists.txt b/tests/umfpack/CMakeLists.txt index 70aca765ff..994c98b39b 100644 --- a/tests/umfpack/CMakeLists.txt +++ b/tests/umfpack/CMakeLists.txt @@ -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)