ADD_SUBDIRECTORY(contrib) # has to be included after source
ADD_SUBDIRECTORY(examples)
-ADD_SUBDIRECTORY(tests ${CMAKE_BINARY_DIR}/tests/quick_tests)
-
-IF(DEAL_II_HAVE_TESTS_DIRECTORY)
- ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests)
-ENDIF()
+ADD_SUBDIRECTORY(tests)
#
# And finally, print the configuration:
# - specifying the maximal wall clock time in seconds a test is allowed
# to run
#
-# TEST_DIR
-# - pointing to the ./tests folder where normalize.pl and run_test.cmake are
-# located under cmake/scripts
-#
-#
# Usage:
# DEAL_II_ADD_TEST(category test_name comparison_file n_cpu [configurations])
#
&& cat ${_test_directory}/failing_output
&& exit 1)
COMMAND
- ${PERL_EXECUTABLE} -pi ${TEST_DIR}/cmake/scripts/normalize.pl
+ ${PERL_EXECUTABLE} -pi ${DEAL_II_SOURCE_DIR}/cmake/scripts/normalize.pl
${_test_directory}/output
WORKING_DIRECTORY
${_test_directory}
DEPENDS
${_target}
- ${TEST_DIR}/cmake/scripts/normalize.pl
+ ${DEAL_II_SOURCE_DIR}/cmake/scripts/normalize.pl
)
ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/diff
COMMAND touch ${_test_directory}/diff
-DTRGT=${_diff_target}
-DTEST=${_test_full}
-DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${TEST_DIR}/cmake/scripts/run_test.cmake
+ -P ${DEAL_II_SOURCE_DIR}/cmake/scripts/run_test.cmake
WORKING_DIRECTORY ${_test_directory}
)
SET_TESTS_PROPERTIES(${_test_full} PROPERTIES
+## ---------------------------------------------------------------------
+## $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.
+##
+## ---------------------------------------------------------------------
+
+#
+# This is a small worker to run a single test in the testsuite
#
-# TODO: The following variables have to be set:
+# The following variables have to be set:
#
-# TARGET
-# TEST
-# DEAL_II_BINARY_DIR
+# TRGT - the name of the target that should be invoked
+# TEST - the test name (used for status messages)
+# DEAL_II_BINARY_DIR - the build directory that contains the target
#
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
MESSAGE("Test ${TEST}: PASSED")
MESSAGE("=============================== OUTPUT BEGIN ===============================")
- #
# Do not output everything, just that we are successful:
- #
- IF(TRGT MATCHES "\\.diff$") # ordinary test:
- MESSAGE("${TEST}: BUILD successful.")
- MESSAGE("${TEST}: RUN successful.")
- MESSAGE("${TEST}: DIFF successful.")
- MESSAGE("${TEST}: PASSED.")
- ELSEIF(TRGT MATCHES "\\.run$") # build_test for steps:
- MESSAGE("${TEST}: CONFIGURE successful.")
- MESSAGE("${TEST}: BUILD successful.")
- MESSAGE("${TEST}: RUN successful.")
- MESSAGE("${TEST}: PASSED.")
- ELSEIF(TRGT MATCHES "\\.build$") # build_test for steps:
- MESSAGE("${TEST}: CONFIGURE successful.")
- MESSAGE("${TEST}: BUILD successful.")
- MESSAGE("${TEST}: PASSED.")
- ELSE() # all-headers test:
- MESSAGE("${TEST}: BUILD successful.")
- MESSAGE("${TEST}: PASSED.")
- ENDIF()
+ MESSAGE("${TEST}: PASSED.")
MESSAGE("=============================== OUTPUT END ===============================")
ELSE()
# Determine whether the CONFIGURE, BUILD or RUN stages were run successfully:
#
- # configure is special because it only exists in build tests:
- STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex ${_output})
+ # CONFIGURE is special because it only exists in build tests:
+ STRING(REGEX MATCH "${TEST}: CONFIGURE successful\\." _configure_regex ${_output})
+ STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex_fail ${_output})
STRING(REGEX MATCH "${TEST}: BUILD successful\\." _build_regex ${_output})
STRING(REGEX MATCH "${TEST}: RUN successful\\." _run_regex ${_output})
- IF(NOT "${_configure_regex}" STREQUAL "")
+ IF(NOT "${_configure_regex_fail}" STREQUAL "")
SET(_stage CONFIGURE)
ELSEIF("${_build_regex}" STREQUAL "")
SET(_stage BUILD)
SET(_stage DIFF)
ENDIF()
-
MESSAGE("Test ${TEST}: ${_stage}")
MESSAGE("=============================== OUTPUT BEGIN ===============================")
- IF("${_build_regex}" STREQUAL "")
- # Some special output in case the BUILD stage failed:
+ IF( "${_build_regex}" STREQUAL "" AND
+ "${_configure_regex}" STREQUAL "" )
+ # Some special output in case the BUILD stage failed in a regression test:
MESSAGE("${TEST}: BUILD failed. Output:")
ENDIF()
MESSAGE(${_output})
--- /dev/null
+## ---------------------------------------------------------------------
+## $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.
+##
+## ---------------------------------------------------------------------
+
+
+########################################################################
+# #
+# Test setup: #
+# #
+########################################################################
+
+#
+# This is the ctest script for running and submitting build and regression
+# tests.
+#
+# Invoke it in a _build directory_ (or designated build directory) via:
+#
+# ctest -S <...>/run_testsuite.cmake
+#
+# The following configuration variables can be overwritten with
+#
+# ctest -D<variable>=<value> [...]
+#
+#
+# CTEST_SOURCE_DIRECTORY
+# - The source directory of deal.II (usually ending in "[...]/deal.II"
+# (equivalent to https://svn.dealii.org/trunk/deal.II)
+# Note: This is _not_ the test directory ending in "[...]/tests"
+# - If unspecified, "../deal.II" relative to the location of this
+# script is used. If this is not a source directory, an error is
+# thrown.
+#
+# CTEST_BINARY_DIRECTORY
+# - The designated build directory (already configured, empty, or non
+# existent - see the information about TRACKs what will happen)
+# - If unspecified the current directory is used. If the current
+# directory is equal to CTEST_SOURCE_DIRECTORY or the "tests"
+# directory, an error is thrown.
+#
+# CTEST_CMAKE_GENERATOR
+# - The CMake Generator to use (e.g. "Unix Makefiles", or "Ninja", see
+# $ man cmake)
+# - If unspecified the generator of a configured build directory will
+# be used, otherwise "Unix Makefiles".
+#
+# TRACK
+# - The track the test should be submitted to. Defaults to
+# "Experimental". Possible values are:
+#
+# "Experimental" - all tests that are not specifically "build" or
+# "regression" tests should go into this track
+#
+# "Build Tests" - Build tests that configure and build in a
+# clean directory and run the build tests
+# "build_tests/*"
+#
+# "Regression Tests" - Reserved for the Regression tester
+#
+# CONFIG_FILE
+# - A configuration file (see ../deal.II/docs/development/Config.sample)
+# that will be used during the configuration stage (invokes
+# # cmake -C ${CONFIG_FILE}). This only has an effect if
+# CTEST_BINARY_DIRECTORY is empty.
+#
+# Furthermore, the following variables controlling the testsuite can be set
+# and will be automatically handed down to cmake:
+#
+# TEST_DIFF
+# TEST_TIME_LIMIT
+# TEST_PICKUP_REGEX
+# NUMDIFF_DIR
+#
+# For details, consult the ./README file.
+#
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+MESSAGE("-- This is CTest ${CMAKE_VERSION}")
+
+#
+# TRACK: Default to Experimental:
+#
+
+IF("${TRACK}" STREQUAL "")
+ SET(TRACK "Experimental")
+ENDIF()
+
+IF( NOT "${TRACK}" STREQUAL "Experimental"
+ AND NOT "${TRACK}" STREQUAL "Build Tests"
+ AND NOT "${TRACK}" STREQUAL "Regression Tests" )
+ MESSAGE(FATAL_ERROR "
+Unknown TRACK \"${TRACK}\" - see the manual for valid values.
+"
+ )
+ENDIF()
+
+MESSAGE("-- TRACK: ${TRACK}")
+
+#
+# CTEST_SOURCE_DIRECTORY:
+#
+
+IF("${CTEST_SOURCE_DIRECTORY}" STREQUAL "")
+ #
+ # If CTEST_SOURCE_DIRECTORY is not set we just assume that this script
+ # was called residing under (a) ../tests relative to the source directory
+ # or (b) cmake/scipts in the source directory
+ #
+ GET_FILENAME_COMPONENT(_path "${CMAKE_CURRENT_LIST_DIR}" PATH)
+ SET(CTEST_SOURCE_DIRECTORY ${_path}/deal.II)
+
+ IF(NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/CMakeLists.txt)
+ GET_FILENAME_COMPONENT(_path "${_path}" PATH)
+ SET(CTEST_SOURCE_DIRECTORY ${_path})
+ ENDIF()
+
+ IF(NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/CMakeLists.txt)
+ MESSAGE(FATAL_ERROR "
+Could not find a suitable source directory. There is no source directory
+\"../deal.II\" or \"../../\" relative to the location of this script.
+Please, set CTEST_SOURCE_DIRECTORY manually to the appropriate source
+directory.
+"
+ )
+ ENDIF()
+ENDIF()
+
+MESSAGE("-- CTEST_SOURCE_DIRECTORY: ${CTEST_SOURCE_DIRECTORY}")
+
+#
+# Read in custom config files:
+#
+
+CTEST_READ_CUSTOM_FILES(${CTEST_SOURCE_DIRECTORY})
+
+#
+# CTEST_BINARY_DIRECTORY:
+#
+
+IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "")
+ #
+ # If CTEST_BINARY_DIRECTORY is not set we just use the current directory
+ # except if it is equal to CTEST_SOURCE_DIRECTORY in which case we fail.
+ #
+ SET(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
+
+ IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CTEST_SOURCE_DIR}"
+ OR "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}" )
+ MESSAGE(FATAL_ERROR "
+ctest was invoked in the source directory (or test source directory) and CTEST_BINARY_DIRECTORY is not set.
+Please either call ctest from within a designated build directory, or set CTEST_BINARY_DIRECTORY accordingly.
+"
+ )
+ ENDIF()
+ENDIF()
+
+#
+# Read in custom config files:
+#
+
+CTEST_READ_CUSTOM_FILES(${CTEST_BINARY_DIRECTORY})
+
+# Make sure that for a build test the directory is empty:
+FILE(GLOB _test ${CTEST_BINARY_DIRECTORY}/*)
+IF( "${TRACK}" STREQUAL "Build Tests"
+ AND NOT "${_test}" STREQUAL "" )
+ MESSAGE(FATAL_ERROR "
+TRACK was set to \"Build Tests\" which require an empty build directory.
+But files were found in \"${CTEST_BINARY_DIRECTORY}\"
+"
+ )
+ENDIF()
+
+MESSAGE("-- CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}")
+
+#
+# CTEST_CMAKE_GENERATOR:
+#
+
+# Query Generator from build directory (if possible):
+IF(EXISTS ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt)
+ FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt _generator
+ REGEX "^CMAKE_GENERATOR:"
+ )
+ STRING(REGEX REPLACE "^.*=" "" _generator ${_generator})
+ENDIF()
+
+IF("${CTEST_CMAKE_GENERATOR}" STREQUAL "")
+ IF(NOT "${_generator}" STREQUAL "")
+ SET(CTEST_CMAKE_GENERATOR ${_generator})
+ ELSE()
+ # default to "Unix Makefiles"
+ SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")
+ ENDIF()
+ELSE()
+ # ensure that CTEST_CMAKE_GENERATOR (that was apparantly set) is
+ # compatible with the build directory:
+ IF( NOT "${CTEST_CMAKE_GENERATOR}" STREQUAL "${_generator}"
+ AND NOT "${_generator}" STREQUAL "" )
+ MESSAGE(FATAL_ERROR "
+The build directory is already set up with Generator \"${_generator}\", but
+CTEST_CMAKE_GENERATOR was set to a different Generator \"${CTEST_CMAKE_GENERATOR}\".
+"
+ )
+ ENDIF()
+ENDIF()
+
+#
+# CTEST_SITE:
+#
+
+FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname)
+EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname)
+SET(CTEST_SITE "${_hostname}")
+
+MESSAGE("-- CTEST_SITE: ${CTEST_SITE}")
+
+IF( "${TRACK}" STREQUAL "Regression Tests"
+ AND NOT CTEST_SITE MATCHES "c0541" )
+ MESSAGE(FATAL_ERROR "
+I'm sorry ${CTEST_SITE}, I'm afraid I can't do that.
+The TRACK \"Regression Tests\" is not for you.
+"
+ )
+ENDIF()
+
+#
+# Assemble configuration options, we need it now:
+#
+
+IF(NOT "${CONFIG_FILE}" STREQUAL "")
+ SET(_options "-C${CONFIG_FILE}")
+ENDIF()
+
+IF("${TRACK}" STREQUAL "Build Tests")
+ SET(TEST_PICKUP_REGEX "^build_tests")
+ENDIF()
+
+# Pass all relevant "TEST_" variables down to configure:
+GET_CMAKE_PROPERTY(_variables VARIABLES)
+FOREACH(_var ${_variables})
+ IF(_var MATCHES
+ "^(TEST_DIFF|TEST_TIME_LIMIT|TEST_PICKUP_REGEX|NUMDIFF_DIR)$"
+ )
+ LIST(APPEND _options "-D${_var}=${${_var}}")
+ ENDIF()
+ENDFOREACH()
+
+#
+# CTEST_BUILD_NAME:
+#
+
+# Append compiler information to CTEST_BUILD_NAME:
+IF(NOT EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
+ # Apparently, ${CTEST_BINARY_DIRECTORY} is not a configured build
+ # directory. In this case we need a trick: set up a dummy project and
+ # query it for the compiler information.
+ FILE(WRITE ${CTEST_BINARY_DIRECTORY}/query_for_compiler/CMakeLists.txt "
+FILE(WRITE ${CTEST_BINARY_DIRECTORY}/detailed.log
+ \"# CMAKE_CXX_COMPILER: \${CMAKE_CXX_COMPILER_ID} \${CMAKE_CXX_COMPILER_VERSION} on platform \${CMAKE_SYSTEM_NAME} \${CMAKE_SYSTEM_PROCESSOR}\"
+ )"
+ )
+ EXECUTE_PROCESS(
+ COMMAND ${CMAKE_COMMAND} ${_options} "-G${CTEST_CMAKE_GENERATOR}" .
+ OUTPUT_QUIET ERROR_QUIET
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}/query_for_compiler
+ )
+ FILE(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/query_for_compiler)
+ENDIF()
+
+IF(EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
+ FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/detailed.log _compiler_id
+ REGEX "CMAKE_CXX_COMPILER:"
+ )
+ STRING(REGEX REPLACE
+ "^.*CMAKE_CXX_COMPILER: \(.*\) on platform.*$" "\\1"
+ _compiler_id ${_compiler_id}
+ )
+ STRING(REGEX REPLACE "^\(.*\) .*$" "\\1" _compiler_name ${_compiler_id})
+ STRING(REGEX REPLACE "^.* " "" _compiler_version ${_compiler_id})
+ STRING(REGEX REPLACE " " "-" _compiler_id ${_compiler_id})
+ IF( NOT "${_compiler_id}" STREQUAL "" OR
+ _compiler_id MATCHES "CMAKE_CXX_COMPILER" )
+ SET(CTEST_BUILD_NAME "${_compiler_id}")
+ ENDIF()
+ENDIF()
+
+#
+# Append subversion branch to CTEST_BUILD_NAME:
+#
+FIND_PACKAGE(Subversion QUIET)
+EXECUTE_PROCESS(
+ COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
+ OUTPUT_QUIET ERROR_QUIET
+ RESULT_VARIABLE _result
+ )
+IF(${_result} EQUAL 0)
+ Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
+ STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
+ STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
+ STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
+ SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}")
+ENDIF()
+
+#
+# Append config file name to CTEST_BUILD_NAME:
+#
+
+IF(NOT "${CONFIG_FILE}" STREQUAL "")
+ GET_FILENAME_COMPONENT(_conf ${CONFIG_FILE} NAME_WE)
+ STRING(REGEX REPLACE "#.*$" "" _conf ${_conf})
+ SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_conf}")
+ENDIF()
+
+MESSAGE("-- CTEST_BUILD_NAME: ${CTEST_BUILD_NAME}")
+
+#
+# We require valid svn information for build tests:
+#
+
+IF( "${TRACK}" STREQUAL "Build Tests"
+ AND NOT DEFINED _svn_WC_REVISION )
+ MESSAGE(FATAL_ERROR "
+TRACK was set to \"Build Tests\" which requires the source directory to be
+under Subversion version control.
+"
+ )
+ENDIF()
+
+#
+# Write revision log:
+#
+
+IF(DEFINED _svn_WC_REVISION)
+ FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
+"###
+#
+# SVN information:
+# SVN_WC_URL: ${_svn_WC_URL}
+# SVN_WC_REVISION: ${_svn_WC_REVISION}
+# SVN_WC_LAST_CHANGED_DATE: ${_svn_WC_LAST_CHANGED_DATE}
+#
+###"
+ )
+ELSE()
+ FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
+"###
+#
+# No SVN information available.
+#
+###"
+ )
+ENDIF()
+
+#
+# Declare files that should be submitted as notes:
+#
+
+SET(CTEST_NOTES_FILES
+ ${CTEST_BINARY_DIRECTORY}/revision.log
+ ${CTEST_BINARY_DIRECTORY}/summary.log
+ ${CTEST_BINARY_DIRECTORY}/detailed.log
+ ${CTEST_BINARY_DIRECTORY}/include/deal.II/base/config.h
+ )
+
+
+########################################################################
+# #
+# Run the testsuite: #
+# #
+########################################################################
+
+IF(NOT "${_branch}" STREQUAL "")
+ SET_PROPERTY(GLOBAL PROPERTY SubProject ${_branch})
+ENDIF()
+
+CTEST_START(Experimental TRACK ${TRACK})
+
+CTEST_CONFIGURE(OPTIONS "${_options}" RETURN_VALUE _res)
+
+IF("${_res}" STREQUAL "0")
+ # Only run the build stage if configure was successful:
+
+ CTEST_BUILD(TARGET NUMBER_ERRORS _res)
+
+ IF("${_res}" STREQUAL "0")
+ # Only run tests if the build was successful:
+
+ EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
+ --build ${CTEST_BINARY_DIRECTORY} --target setup_test
+ OUTPUT_QUIET RESULT_VARIABLE _res
+ )
+ IF(NOT "${_res}" STREQUAL "0")
+ MESSAGE(FATAL_ERROR "
+\"setup_test\" target exited with an error. Bailing out.
+"
+ )
+ ENDIF()
+
+ CTEST_TEST()
+ ENDIF()
+ENDIF()
+
+#
+# Inject compiler information and svn revision into xml files:
+#
+
+FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG _tag LIMIT_COUNT 1)
+SET(_path "${CTEST_BINARY_DIRECTORY}/Testing/${_tag}")
+IF(NOT EXISTS ${_path})
+ MESSAGE(FATAL_ERROR "
+Unable to determine test submission files from TAG. Bailing out.
+"
+ )
+ENDIF()
+FILE(GLOB _xml_files ${_path}/*.xml)
+EXECUTE_PROCESS(COMMAND sed -i -e
+ s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
+ ${_xml_files}
+ OUTPUT_QUIET RESULT_VARIABLE _res
+ )
+IF(NOT "${_res}" STREQUAL "0")
+ MESSAGE(FATAL_ERROR "
+\"sed\" failed. Bailing out.
+"
+ )
+ENDIF()
+
+IF(NOT "${_svn_WC_REVISION}" STREQUAL "")
+ FILE(WRITE ${_path}/Update.xml
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
+<Update mode=\"Client\" Generator=\"ctest-${CTEST_VERSION}\">
+ <Site>${CTEST_SITE}</Site>
+ <BuildName>${CTEST_BUILD_NAME}</BuildName>
+ <BuildStamp>${_tag}-${TRACK}</BuildStamp>
+ <UpdateType>SVN</UpdateType>
+ <Revision>${_svn_WC_REVISION}</Revision>
+ <Path>${_branch}</Path>
+</Update>"
+ )
+ENDIF()
+
+#
+# And finally submit:
+#
+
+CTEST_SUBMIT()
+
+# .oO( This script is freaky 461 lines long... )
## ---------------------------------------------------------------------
#
-# Setup necessary configuration for a testsuite sub project.
+# Setup necessary configuration in the testsuite subprojects.
+# This file is directly included by the test subprojects and not by the
+# main project.
#
-# A testsuite subproject assumes the following cached variables to be set:
+# It is assumed that the following variables are set:
#
# DEAL_II_BINARY_DIR
# DEAL_II_SOURCE_DIR
#
# Load all macros:
#
-
-FILE(GLOB _macro_files ${CMAKE_CURRENT_LIST_DIR}/macros/*.cmake)
+FILE(GLOB _macro_files ${DEAL_II_SOURCE_DIR}/cmake/macros/*.cmake)
FOREACH(_file ${_macro_files})
INCLUDE(${_file})
ENDFOREACH()
#
# Pick up values from environment:
#
-
SET_IF_EMPTY(DEAL_II_BINARY_DIR $ENV{DEAL_II_BINARY_DIR})
SET_IF_EMPTY(DEAL_II_BINARY_DIR $ENV{DEAL_II_DIR})
SET_IF_EMPTY(DEAL_II_SOURCE_DIR $ENV{DEAL_II_SOURCE_DIR})
#
# We need deal.II and Perl as external packages:
#
-
FIND_PACKAGE(deal.II 8.0 REQUIRED
HINTS ${DEAL_II_BINARY_DIR} ${DEAL_II_DIR}
)
#
# We need a diff tool, preferably numdiff:
#
-
FIND_PROGRAM(DIFF_EXECUTABLE
NAMES diff
)
ELSE()
# TODO: I have no idea how to prepare a custom string comming possibly
# through two layers of command line into a list...
- SEPARATE_ARGUMENTS(TEST_DIFF UNIX_COMMAND ${TEST_DIFF})
+ SEPARATE_ARGUMENTS(TEST_DIFF ${TEST_DIFF})
ENDIF()
#
# Set a default time limit of 600 seconds:
#
-
SET_IF_EMPTY(TEST_TIME_LIMIT 600)
#
# And finally, enable testing:
#
-
ENABLE_TESTING()
## ---------------------------------------------------------------------
#
-# A minimalistic set of tests:
+# 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 :-(
+#
+
+ADD_SUBDIRECTORY(quick_tests)
+
+#
+# Custom targets to set and clean up the testsuite:
+#
+
+# Setup tests:
+ADD_CUSTOM_TARGET(setup_test)
+
+# Clean all tests
+ADD_CUSTOM_TARGET(clean_test)
-ENABLE_TESTING()
-
-FOREACH(_build ${DEAL_II_BUILD_TYPES})
- STRING(TOLOWER ${_build} _build_lowercase)
-
- #
- # Test whether it is possible to configure, build and run a simplistic
- # project, we use step 1:
- #
-
- SET(_target project.${_build_lowercase})
- SET(_project_src ${CMAKE_SOURCE_DIR}/examples/step-1)
- SET(_project ${CMAKE_CURRENT_BINARY_DIR}/${_target})
-
- ADD_CUSTOM_COMMAND(OUTPUT ${_project}/CMakeLists.txt
- COMMAND ${CMAKE_COMMAND} -E copy ${_project_src}/step-1.cc ${_project}/step-1.cc
- COMMAND ${CMAKE_COMMAND} -E copy ${_project_src}/CMakeLists.txt ${_project}/CMakeLists.txt
- DEPENDS ${_project_src}/step-1.cc ${_project_src}/CMakeLists.txt
- )
- ADD_CUSTOM_COMMAND(OUTPUT ${_project}-OK
- COMMAND ${CMAKE_COMMAND} -DDEAL_II_DIR=${CMAKE_BINARY_DIR} -DCMAKE_BUILD_TYPE=${_build} .
- || (rm ${_project}-OK && exit 1)
- COMMAND ${CMAKE_COMMAND} --build ${_project} --target run > ${CMAKE_CURRENT_BINARY_DIR}/${_target}-OK
- || (rm ${_project}-OK && exit 1)
- COMMAND touch ${_project}-OK
- WORKING_DIRECTORY ${_project}
- DEPENDS ${_project}/CMakeLists.txt
- )
- ADD_CUSTOM_TARGET(${_target} DEPENDS ${_project}-OK)
-
- ADD_TEST(NAME ${_target}
- COMMAND ${CMAKE_COMMAND} -DTRGT=${_target} -DTEST=${_target}
- -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
- SET_TESTS_PROPERTIES(${_test} PROPERTIES LABEL "sanity checks")
-
- #
- # Test whether thread affinity is well behaved:
- #
- SET(_target affinity.${_build_lowercase})
-
- ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL affinity.cc)
- DEAL_II_INSOURCE_SETUP_TARGET(${_target} ${_build})
-
- ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target}-OK
- COMMAND ${_target} > ${CMAKE_CURRENT_BINARY_DIR}/${_target}-OK 2>&1 || (rm ${_target}-OK && exit 1)
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
- ADD_CUSTOM_TARGET(${_target}.run DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_target}-OK)
-
- ADD_TEST(NAME ${_target}
- COMMAND ${CMAKE_COMMAND} -DTRGT=${_target}.run -DTEST=${_target}
- -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
- SET_TESTS_PROPERTIES(${_target} PROPERTIES LABEL "sanity checks")
+# Remove all tests:
+ADD_CUSTOM_TARGET(prune_test)
+#
+# Write a minimalistic CTestTestfile.cmake file to CMAKE_BINARY_DIR and
+# CMAKE_CURRENT_BINARY_DIR:
+#
+FILE(WRITE ${CMAKE_BINARY_DIR}/CTestTestfile.cmake
+ "SUBDIRS(tests)"
+ )
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfile.cmake "")
+
+#
+# Pass all relevant "TEST_" and "_DIR" variables down to the subprojects:
+#
+SET(_options)
+LIST(APPEND _options -DDEAL_II_SOURCE_DIR=${CMAKE_SOURCE_DIR})
+LIST(APPEND _options -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR})
+FOREACH(_var TEST_DIFF TEST_TIME_LIMIT TEST_PICKUP_REGEX NUMDIFF_DIR)
+ LIST(APPEND _options "-U${_var}")
+ IF(DEFINED ${_var})
+ LIST(APPEND _options "-D${_var}=${${_var}}")
+ ENDIF()
ENDFOREACH()
#
-# A custom test target:
+# Glob together a list of all subfolders to set up:
#
-# @TIMO: TODO, write a little script to be run after ctest that queries for
-# (affinity|project|etc).(debug|release)-OK and outputs an appropriate
-# message.
+FILE(GLOB _categories RELATIVE ${TEST_DIR} ${TEST_DIR}/*)
+SET(_categories all-headers build_tests ${_categories})
+
#
-ADD_CUSTOM_TARGET(test
- COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
- )
+# Define a subproject for every enabled category:
+#
+
+FOREACH(_category ${_categories})
+ IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${_category}/CMakeLists.txt)
+ SET(_category_dir ${CMAKE_CURRENT_SOURCE_DIR}/${_category})
+ ELSEIF(EXISTS ${TEST_DIR}/${_category}/CMakeLists.txt)
+ SET(_category_dir ${TEST_DIR}/${_category})
+ ELSE()
+ SET(_category_dir)
+ ENDIF()
+
+ IF(NOT "${_category_dir}" STREQUAL "")
+
+ ADD_CUSTOM_TARGET(setup_test_${_category}
+ COMMAND ${CMAKE_COMMAND} -E make_directory
+ ${CMAKE_CURRENT_BINARY_DIR}/${_category}
+ COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/${_category} &&
+ ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_options} ${_category_dir}
+ > /dev/null # Shoo!
+ DEPENDS ${_category_dir}
+ COMMENT "Processing tests/${_category}"
+ )
+ ADD_DEPENDENCIES(setup_test setup_test_${_category})
+
+ # depend on a valid build directory (libraries built, config in place):
+ ADD_DEPENDENCIES(setup_test_${_category} setup_build_dir)
+
+ ADD_CUSTOM_TARGET(clean_test_${_category}
+ COMMAND [ ! -d ${_category} ] || ${CMAKE_COMMAND}
+ --build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target clean
+ )
+ ADD_DEPENDENCIES(clean_test clean_test_${_category})
+
+ ADD_CUSTOM_TARGET(prune_test_${_category}
+ COMMAND ${CMAKE_COMMAND} -E remove_directory
+ ${CMAKE_CURRENT_BINARY_DIR}/${_category}
+ )
+ ADD_DEPENDENCIES(prune_test prune_test_${_category})
+
+ FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfile.cmake
+ "SUBDIRS(${_category})\n"
+ )
+
+ ENDIF()
+ENDFOREACH()
## ---------------------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
# And finally add the test:
ADD_TEST(NAME ${_test}
- COMMAND ${CMAKE_COMMAND}
- -DTRGT=${_target}
- -DTEST=${_test}
+ COMMAND ${CMAKE_COMMAND} -DTRGT=${_target} -DTEST=${_test}
-DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${TEST_DIR}/cmake/scripts/run_test.cmake
+ -P ${DEAL_II_SOURCE_DIR}/cmake/scripts/run_test.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
SET_TESTS_PROPERTIES(${_test} PROPERTIES
## ---------------------------------------------------------------------
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
# And finally add the test:
ADD_TEST(NAME ${_test}
- COMMAND ${CMAKE_COMMAND}
- -DTRGT=${_target}
- -DTEST=${_test}
+ COMMAND ${CMAKE_COMMAND} -DTRGT=${_target} -DTEST=${_test}
-DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${TEST_DIR}/cmake/scripts/run_test.cmake
+ -P ${DEAL_II_SOURCE_DIR}/cmake/scripts/run_test.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
SET_TESTS_PROPERTIES(${_test} PROPERTIES
--- /dev/null
+## ---------------------------------------------------------------------
+## $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.
+##
+## ---------------------------------------------------------------------
+
+#
+# A minimalistic set of tests:
+#
+
+ENABLE_TESTING()
+
+FOREACH(_build ${DEAL_II_BUILD_TYPES})
+ STRING(TOLOWER ${_build} _build_lowercase)
+
+ #
+ # Test whether thread affinity is well behaved:
+ #
+ SET(_target affinity.${_build_lowercase})
+
+ ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL affinity.cc)
+ DEAL_II_INSOURCE_SETUP_TARGET(${_target} ${_build})
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_target}-OK
+ COMMAND ${_target} > ${CMAKE_CURRENT_BINARY_DIR}/${_target}-OK 2>&1 || (rm ${_target}-OK && exit 1)
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ ADD_CUSTOM_TARGET(${_target}.run DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_target}-OK)
+
+ ADD_TEST(NAME ${_target}
+ COMMAND ${CMAKE_COMMAND} -DTRGT=${_target}.run -DTEST=${_target}
+ -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
+ -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
+ SET_TESTS_PROPERTIES(${_target} PROPERTIES LABEL "sanity checks")
+
+ENDFOREACH()
+
+#
+# A custom test target:
+#
+ADD_CUSTOM_TARGET(test
+ COMMAND ${CMAKE_CTEST_COMMAND} --force-new-ctest-process
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+ )
-## ---------------------------------------------------------------------
-## $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.
-##
-## ---------------------------------------------------------------------
-
-#
-# 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 :-(
-#
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-MESSAGE(STATUS "Proceed to test definitions now.")
-ENABLE_TESTING()
-
-IF(NOT "${CMAKE_PROJECT_NAME}" STREQUAL "deal.II")
- MESSAGE(FATAL_ERROR
- "The testsuite cannot be set up as an independent project. Please configure \"deal.II\" instead."
- )
-ENDIF()
-
-#
-# Write a minimalistic CTestTestfile.cmake file to CMAKE_BINARY_DIR:
-#
-FILE(WRITE ${CMAKE_BINARY_DIR}/CTestTestfile.cmake
- "SUBDIRS(tests)"
+MESSAGE(FATAL_ERROR "\n
+The testsuite cannot be set up as an independent project.
+Please configure \"deal.II\" directly instead.\n\n"
)
-
-#
-# The hook into CTest so that the tests from the suprojects get picked up
-# by the main project:
-#
-
-FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/deal.IITestfile.cmake "")
-SET_PROPERTY(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- APPEND PROPERTY TEST_INCLUDE_FILE deal.IITestfile.cmake
- )
-
-#
-# Pass all relevant "TEST_" and "_DIR" variables down to the subprojects:
-#
-
-SET(_options)
-
-LIST(APPEND _options -DDEAL_II_SOURCE_DIR=${CMAKE_SOURCE_DIR})
-LIST(APPEND _options -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR})
-
-FOREACH(_var TEST_DIR TEST_DIFF TEST_TIME_LIMIT TEST_PICKUP_REGEX NUMDIFF_DIR)
- LIST(APPEND _options "-U${_var}")
- IF(DEFINED ${_var})
- LIST(APPEND _options "-D${_var}=${${_var}}")
- ENDIF()
-ENDFOREACH()
-
-#
-# Custom targets to set and clean up the testsuite:
-#
-
-# Setup tests:
-ADD_CUSTOM_TARGET(setup_test)
-
-# Clean all tests
-ADD_CUSTOM_TARGET(clean_test)
-
-# Remove all tests:
-ADD_CUSTOM_TARGET(prune_test)
-
-#
-# The list of subfolders to set up:
-#
-
-SET(_categories
- all-headers aniso base bits build_tests codim_one deal.II fe grid hp integrators lac matrix_free multigrid serialization
- )
-IF(DEAL_II_WITH_LAPACK)
- LIST(APPEND _categories lapack)
-ENDIF()
-IF(DEAL_II_WITH_METIS)
- LIST(APPEND _categories metis)
-ENDIF()
-IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
- LIST(APPEND _categories gla mpi)
-ENDIF()
-IF(DEAL_II_WITH_P4EST)
- LIST(APPEND _categories distributed_grids)
-ENDIF()
-IF(DEAL_II_WITH_PETSC)
- LIST(APPEND _categories petsc)
-ENDIF()
-IF(DEAL_II_WITH_SLEPC)
- LIST(APPEND _categories slepc)
-ENDIF()
-IF(DEAL_II_WITH_TRILINOS)
- LIST(APPEND _categories trilinos)
-ENDIF()
-IF(DEAL_II_WITH_UMFPACK)
- LIST(APPEND _categories umfpack)
-ENDIF()
-
-#
-# Define a subproject for every enabled category:
-#
-
-FOREACH(_category ${_categories})
- ADD_CUSTOM_TARGET(setup_test_${_category}
- COMMAND ${CMAKE_COMMAND} -E make_directory
- ${CMAKE_CURRENT_BINARY_DIR}/${_category}
- COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/${_category} &&
- ${CMAKE_COMMAND} -G${CMAKE_GENERATOR}
- ${_options}
- ${CMAKE_CURRENT_SOURCE_DIR}/${_category}
- > /dev/null # Shoo!
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_category}
- COMMENT "Processing ./tests/${_category}"
- )
- ADD_DEPENDENCIES(setup_test setup_test_${_category})
-
- # depend on a valid build directory (libraries built, config in place):
- ADD_DEPENDENCIES(setup_test_${_category} setup_build_dir)
-
- ADD_CUSTOM_TARGET(clean_test_${_category}
- COMMAND [ ! -d ${_category} ] || ${CMAKE_COMMAND}
- --build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target clean
- )
- ADD_DEPENDENCIES(clean_test clean_test_${_category})
-
- ADD_CUSTOM_TARGET(prune_test_${_category}
- COMMAND ${CMAKE_COMMAND} -E remove_directory
- ${CMAKE_CURRENT_BINARY_DIR}/${_category}
- )
- ADD_DEPENDENCIES(prune_test prune_test_${_category})
-
- FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/deal.IITestfile.cmake
- "SUBDIRS(${_category})\n"
- )
-ENDFOREACH()
distributed_grids/ fail.
- ISSUE:
- Depending on the version of boost, a version number in the serialization
- output changes and all tests just under serialization/ just fail
+ Quite some tests that use PETSc depend on specific external packages,
+ e.g. hypre and mumps
- Mesh converter tests?
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
+++ /dev/null
-## ---------------------------------------------------------------------
-## $Id$
-##
-## Copyright (C) 2012 - 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.
-##
-## ---------------------------------------------------------------------
-
-#
-# A small macro to test whether a given list contains an element.
-#
-# Usage:
-# ITEM_MATCHES(var regex list)
-#
-# var is set to true if list contains an item that matches regex.
-#
-
-MACRO(ITEM_MATCHES _var _regex)
- SET(${_var})
- FOREACH (_item ${ARGN})
- IF("${_item}" MATCHES ${_regex})
- SET(${_var} TRUE)
- BREAK()
- ENDIF()
- ENDFOREACH()
-ENDMACRO()
-
+++ /dev/null
-## ---------------------------------------------------------------------
-## $Id$
-##
-## Copyright (C) 2012 - 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.
-##
-## ---------------------------------------------------------------------
-
-#
-# If 'variable' is empty it will be set to 'value'
-#
-MACRO(SET_IF_EMPTY _variable)
- IF("${${_variable}}" STREQUAL "")
- SET(${_variable} ${ARGN})
- ENDIF()
-ENDMACRO()
-
+++ /dev/null
-## ---------------------------------------------------------------------
-## $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.
-##
-## ---------------------------------------------------------------------
-
-#
-# This is a small worker to run a single test in the testsuite
-#
-# The following variables have to be set:
-#
-# TRGT - the name of the target that should be invoked
-# TEST - the test name (used for status messages)
-# DEAL_II_BINARY_DIR - the build directory that contains the target
-#
-
-EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
- --build ${DEAL_II_BINARY_DIR} --target ${TRGT}
- RESULT_VARIABLE _result_code
- OUTPUT_VARIABLE _output
- )
-
-IF("${_result_code}" STREQUAL "0")
-
- MESSAGE("Test ${TEST}: PASSED")
- MESSAGE("=============================== OUTPUT BEGIN ===============================")
- # Do not output everything, just that we are successful:
- MESSAGE("${TEST}: PASSED.")
- MESSAGE("=============================== OUTPUT END ===============================")
-
-ELSE()
-
- #
- # Determine whether the CONFIGURE, BUILD or RUN stages were run successfully:
- #
-
- # CONFIGURE is special because it only exists in build tests:
- STRING(REGEX MATCH "${TEST}: CONFIGURE successful\\." _configure_regex ${_output})
- STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex_fail ${_output})
- STRING(REGEX MATCH "${TEST}: BUILD successful\\." _build_regex ${_output})
- STRING(REGEX MATCH "${TEST}: RUN successful\\." _run_regex ${_output})
- IF(NOT "${_configure_regex_fail}" STREQUAL "")
- SET(_stage CONFIGURE)
- ELSEIF("${_build_regex}" STREQUAL "")
- SET(_stage BUILD)
- ELSEIF("${_run_regex}" STREQUAL "")
- SET(_stage RUN)
- ELSE()
- SET(_stage DIFF)
- ENDIF()
-
- MESSAGE("Test ${TEST}: ${_stage}")
- MESSAGE("=============================== OUTPUT BEGIN ===============================")
- IF( "${_build_regex}" STREQUAL "" AND
- "${_configure_regex}" STREQUAL "" )
- # Some special output in case the BUILD stage failed in a regression test:
- MESSAGE("${TEST}: BUILD failed. Output:")
- ENDIF()
- MESSAGE(${_output})
- MESSAGE("")
- MESSAGE("${TEST}: ****** ${_stage} failed *******")
- MESSAGE("")
- MESSAGE("=============================== OUTPUT END ===============================")
- MESSAGE(FATAL_ERROR "*** abort")
-
-ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_P4EST)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_LAPACK)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_METIS)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_PETSC)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
--- /dev/null
+SET(TRACK "Build Tests")
+INCLUDE(${CMAKE_CURRENT_LIST_DIR}/run_testsuite.cmake)
##
## ---------------------------------------------------------------------
-
-########################################################################
-# #
-# Test setup: #
-# #
-########################################################################
-
-#
-# This is the ctest script for running and submitting build and regression
-# tests.
-#
-# Invoke it in a _build directory_ (or designated build directory) via:
-#
-# ctest -S <...>/run_testsuite.cmake
-#
-# The following configuration variables can be overwritten with
-#
-# ctest -D<variable>=<value> [...]
-#
-#
-# CTEST_SOURCE_DIRECTORY
-# - The source directory of deal.II (usually ending in "[...]/deal.II"
-# (equivalent to https://svn.dealii.org/trunk/deal.II)
-# Note: This is _not_ the test directory ending in "[...]/tests"
-# - If unspecified, "../deal.II" relative to the location of this
-# script is used. If this is not a source directory, an error is
-# thrown.
-#
-# CTEST_BINARY_DIRECTORY
-# - The designated build directory (already configured, empty, or non
-# existent - see the information about TRACKs what will happen)
-# - If unspecified the current directory is used. If the current
-# directory is equal to CTEST_SOURCE_DIRECTORY or the "tests"
-# directory, an error is thrown.
#
-# CTEST_CMAKE_GENERATOR
-# - The CMake Generator to use (e.g. "Unix Makefiles", or "Ninja", see
-# $ man cmake)
-# - If unspecified the generator of a configured build directory will
-# be used, otherwise "Unix Makefiles".
-#
-# TRACK
-# - The track the test should be submitted to. Defaults to
-# "Experimental". Possible values are:
-#
-# "Experimental" - all tests that are not specifically "build" or
-# "regression" tests should go into this track
-#
-# "Build Tests" - Build tests that configure and build in a
-# clean directory and run the build tests
-# "build_tests/*"
-#
-# "Regression Tests" - Reserved for the Regression tester
-#
-# CONFIG_FILE
-# - A configuration file (see ../deal.II/docs/development/Config.sample)
-# that will be used during the configuration stage (invokes
-# # cmake -C ${CONFIG_FILE}). This only has an effect if
-# CTEST_BINARY_DIRECTORY is empty.
-#
-# Furthermore, the following variables controlling the testsuite can be set
-# and will be automatically handed down to cmake:
-#
-# TEST_DIFF
-# TEST_TIME_LIMIT
-# TEST_PICKUP_REGEX
-# NUMDIFF_DIR
-#
-# For details, consult the ./README file.
-#
-
-
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-MESSAGE("-- This is CTest ${CTEST_VERSION}")
-
-#
-# TRACK: Default to Experimental:
-#
-
-IF("${TRACK}" STREQUAL "")
- SET(TRACK "Experimental")
-ENDIF()
-
-IF( NOT "${TRACK}" STREQUAL "Experimental"
- AND NOT "${TRACK}" STREQUAL "Build Tests"
- AND NOT "${TRACK}" STREQUAL "Regression Tests" )
- MESSAGE(FATAL_ERROR "
-Unknown TRACK \"${TRACK}\" - see the manual for valid values.
-"
- )
-ENDIF()
-
-MESSAGE("-- TRACK: ${TRACK}")
-
-#
-# CTEST_SOURCE_DIRECTORY:
+# Try to find the source directory and invoke
+# ./cmake/scripts/run_testsuite.cmake from this location:
#
IF("${CTEST_SOURCE_DIRECTORY}" STREQUAL "")
- #
# If CTEST_SOURCE_DIRECTORY is not set we just assume that this script
# was called residing under ../tests relative to the source directory.
- #
GET_FILENAME_COMPONENT(_path "${CMAKE_CURRENT_LIST_DIR}" PATH)
SET(CTEST_SOURCE_DIRECTORY ${_path}/deal.II)
-
- IF(NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/CMakeLists.txt)
- MESSAGE(FATAL_ERROR "
-Could not find a suitable source directory. Either the run_testsuite.cmake
-script was called residing outside of \"tests\", or there is no source
-directory \"../deal.II\" relative to the tests directory.
-Please, set CTEST_SOURCE_DIRECTORY manually to the appropriate source
-directory.
-"
- )
- ENDIF()
-ENDIF()
-
-MESSAGE("-- CTEST_SOURCE_DIRECTORY: ${CTEST_SOURCE_DIRECTORY}")
-
-#
-# Read in custom config files:
-#
-
-CTEST_READ_CUSTOM_FILES(${CTEST_SOURCE_DIRECTORY})
-
-#
-# CTEST_BINARY_DIRECTORY:
-#
-
-IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "")
- #
- # If CTEST_BINARY_DIRECTORY is not set we just use the current directory
- # except if it is equal to CTEST_SOURCE_DIRECTORY in which case we fail.
- #
- SET(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-
- IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CTEST_SOURCE_DIR}"
- OR "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}" )
- MESSAGE(FATAL_ERROR "
-ctest was invoked in the source directory (or test source directory) and CTEST_BINARY_DIRECTORY is not set.
-Please either call ctest from within a designated build directory, or set CTEST_BINARY_DIRECTORY accordingly.
-"
- )
- ENDIF()
-ENDIF()
-
-#
-# Read in custom config files:
-#
-
-CTEST_READ_CUSTOM_FILES(${CTEST_BINARY_DIRECTORY})
-
-# Make sure that for a build test the directory is empty:
-FILE(GLOB _test ${CTEST_BINARY_DIRECTORY}/*)
-IF( "${TRACK}" STREQUAL "Build Tests"
- AND NOT "${_test}" STREQUAL "" )
- MESSAGE(FATAL_ERROR "
-TRACK was set to \"Build Tests\" which require an empty build directory.
-But files were found in \"${CTEST_BINARY_DIRECTORY}\"
-"
- )
-ENDIF()
-
-MESSAGE("-- CTEST_BINARY_DIRECTORY: ${CTEST_BINARY_DIRECTORY}")
-
-#
-# CTEST_CMAKE_GENERATOR:
-#
-
-# Query Generator from build directory (if possible):
-IF(EXISTS ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt)
- FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/CMakeCache.txt _generator
- REGEX "^CMAKE_GENERATOR:"
- )
- STRING(REGEX REPLACE "^.*=" "" _generator ${_generator})
-ENDIF()
-
-IF("${CTEST_CMAKE_GENERATOR}" STREQUAL "")
- IF(NOT "${_generator}" STREQUAL "")
- SET(CTEST_CMAKE_GENERATOR ${_generator})
- ELSE()
- # default to "Unix Makefiles"
- SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")
- ENDIF()
-ELSE()
- # ensure that CTEST_CMAKE_GENERATOR (that was apparantly set) is
- # compatible with the build directory:
- IF( NOT "${CTEST_CMAKE_GENERATOR}" STREQUAL "${_generator}"
- AND NOT "${_generator}" STREQUAL "" )
- MESSAGE(FATAL_ERROR "
-The build directory is already set up with Generator \"${_generator}\", but
-CTEST_CMAKE_GENERATOR was set to a different Generator \"${CTEST_CMAKE_GENERATOR}\".
-"
- )
- ENDIF()
-ENDIF()
-
-#
-# CTEST_SITE:
-#
-
-FIND_PROGRAM(HOSTNAME_COMMAND NAMES hostname)
-EXEC_PROGRAM(${HOSTNAME_COMMAND} OUTPUT_VARIABLE _hostname)
-SET(CTEST_SITE "${_hostname}")
-
-MESSAGE("-- CTEST_SITE: ${CTEST_SITE}")
-
-IF( "${TRACK}" STREQUAL "Regression Tests"
- AND NOT CTEST_SITE MATCHES "c0541" )
- MESSAGE(FATAL_ERROR "
-I'm sorry ${CTEST_SITE}, I'm afraid I can't do that.
-The TRACK \"Regression Tests\" is not for you.
-"
- )
-ENDIF()
-
-#
-# Assemble configuration options, we need it now:
-#
-
-IF(NOT "${CONFIG_FILE}" STREQUAL "")
- SET(_options "-C${CONFIG_FILE}")
-ENDIF()
-
-IF("${TRACK}" STREQUAL "Build Tests")
- SET(TEST_PICKUP_REGEX "^build_tests")
-ENDIF()
-
-# Pass all relevant "TEST_" variables down to configure:
-GET_CMAKE_PROPERTY(_variables VARIABLES)
-FOREACH(_var ${_variables})
- IF(_var MATCHES
- "^(TEST_DIFF|TEST_TIME_LIMIT|TEST_PICKUP_REGEX|NUMDIFF_DIR)$"
- )
- LIST(APPEND _options "-D${_var}=${${_var}}")
- ENDIF()
-ENDFOREACH()
-
-#
-# CTEST_BUILD_NAME:
-#
-
-# Append compiler information to CTEST_BUILD_NAME:
-IF(NOT EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
- # Apparently, ${CTEST_BINARY_DIRECTORY} is not a configured build
- # directory. In this case we need a trick: set up a dummy project and
- # query it for the compiler information.
- FILE(WRITE ${CTEST_BINARY_DIRECTORY}/query_for_compiler/CMakeLists.txt "
-FILE(WRITE ${CTEST_BINARY_DIRECTORY}/detailed.log
- \"# CMAKE_CXX_COMPILER: \${CMAKE_CXX_COMPILER_ID} \${CMAKE_CXX_COMPILER_VERSION} on platform \${CMAKE_SYSTEM_NAME} \${CMAKE_SYSTEM_PROCESSOR}\"
- )"
- )
- EXECUTE_PROCESS(
- COMMAND ${CMAKE_COMMAND} ${_options} "-G${CTEST_CMAKE_GENERATOR}" .
- OUTPUT_QUIET ERROR_QUIET
- WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}/query_for_compiler
- )
- FILE(REMOVE_RECURSE ${CTEST_BINARY_DIRECTORY}/query_for_compiler)
-ENDIF()
-
-IF(EXISTS ${CTEST_BINARY_DIRECTORY}/detailed.log)
- FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/detailed.log _compiler_id
- REGEX "CMAKE_CXX_COMPILER:"
- )
- STRING(REGEX REPLACE
- "^.*CMAKE_CXX_COMPILER: \(.*\) on platform.*$" "\\1"
- _compiler_id ${_compiler_id}
- )
- STRING(REGEX REPLACE "^\(.*\) .*$" "\\1" _compiler_name ${_compiler_id})
- STRING(REGEX REPLACE "^.* " "" _compiler_version ${_compiler_id})
- STRING(REGEX REPLACE " " "-" _compiler_id ${_compiler_id})
- IF( NOT "${_compiler_id}" STREQUAL "" OR
- _compiler_id MATCHES "CMAKE_CXX_COMPILER" )
- SET(CTEST_BUILD_NAME "${_compiler_id}")
- ENDIF()
ENDIF()
-#
-# Append subversion branch to CTEST_BUILD_NAME:
-#
-FIND_PACKAGE(Subversion QUIET)
-EXECUTE_PROCESS(
- COMMAND ${Subversion_SVN_EXECUTABLE} info ${CTEST_SOURCE_DIRECTORY}
- OUTPUT_QUIET ERROR_QUIET
- RESULT_VARIABLE _result
- )
-IF(${_result} EQUAL 0)
- Subversion_WC_INFO(${CTEST_SOURCE_DIRECTORY} _svn)
- STRING(REGEX REPLACE "^${_svn_WC_ROOT}/" "" _branch ${_svn_WC_URL})
- STRING(REGEX REPLACE "^branches/" "" _branch ${_branch})
- STRING(REGEX REPLACE "/deal.II$" "" _branch ${_branch})
- SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_branch}")
-ENDIF()
-
-#
-# Append config file name to CTEST_BUILD_NAME:
-#
-
-IF(NOT "${CONFIG_FILE}" STREQUAL "")
- GET_FILENAME_COMPONENT(_conf ${CONFIG_FILE} NAME_WE)
- STRING(REGEX REPLACE "#.*$" "" _conf ${_conf})
- SET(CTEST_BUILD_NAME "${CTEST_BUILD_NAME}-${_conf}")
-ENDIF()
-
-MESSAGE("-- CTEST_BUILD_NAME: ${CTEST_BUILD_NAME}")
-
-#
-# We require valid svn information for build tests:
-#
-
-IF( "${TRACK}" STREQUAL "Build Tests"
- AND NOT DEFINED _svn_WC_REVISION )
+IF(NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/run_testsuite.cmake)
MESSAGE(FATAL_ERROR "
-TRACK was set to \"Build Tests\" which requires the source directory to be
-under Subversion version control.
+Could not find a suitable source directory.
+There is no source directory \"../deal.II\" relative to the location of this script.
+Please, set CTEST_SOURCE_DIRECTORY manually to the appropriate source directory.
"
)
ENDIF()
-#
-# Write revision log:
-#
-
-IF(DEFINED _svn_WC_REVISION)
- FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
-"###
-#
-# SVN information:
-# SVN_WC_URL: ${_svn_WC_URL}
-# SVN_WC_REVISION: ${_svn_WC_REVISION}
-# SVN_WC_LAST_CHANGED_DATE: ${_svn_WC_LAST_CHANGED_DATE}
-#
-###"
- )
-ELSE()
- FILE(WRITE ${CTEST_BINARY_DIRECTORY}/revision.log
-"###
-#
-# No SVN information available.
-#
-###"
- )
-ENDIF()
-
-#
-# Declare files that should be submitted as notes:
-#
-
-SET(CTEST_NOTES_FILES
- ${CTEST_BINARY_DIRECTORY}/revision.log
- ${CTEST_BINARY_DIRECTORY}/summary.log
- ${CTEST_BINARY_DIRECTORY}/detailed.log
- ${CTEST_BINARY_DIRECTORY}/include/deal.II/base/config.h
- )
-
-
-########################################################################
-# #
-# Run the testsuite: #
-# #
-########################################################################
-
-IF(NOT "${_branch}" STREQUAL "")
- SET_PROPERTY(GLOBAL PROPERTY SubProject ${_branch})
-ENDIF()
-
-CTEST_START(Experimental TRACK ${TRACK})
-
-CTEST_CONFIGURE(OPTIONS "${_options}" RETURN_VALUE _res)
-
-IF("${_res}" STREQUAL "0")
- # Only run the build stage if configure was successful:
-
- CTEST_BUILD(TARGET NUMBER_ERRORS _res)
-
- IF("${_res}" STREQUAL "0")
- # Only run tests if the build was successful:
-
- EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND}
- --build ${CTEST_BINARY_DIRECTORY} --target setup_test
- OUTPUT_QUIET RESULT_VARIABLE _res
- )
- IF(NOT "${_res}" STREQUAL "0")
- MESSAGE(FATAL_ERROR "
-\"setup_test\" target exited with an error. Bailing out.
-"
- )
- ENDIF()
-
- CTEST_TEST()
- ENDIF()
-ENDIF()
-
-#
-# Inject compiler information and svn revision into xml files:
-#
-
-FILE(STRINGS ${CTEST_BINARY_DIRECTORY}/Testing/TAG _tag LIMIT_COUNT 1)
-SET(_path "${CTEST_BINARY_DIRECTORY}/Testing/${_tag}")
-IF(NOT EXISTS ${_path})
- MESSAGE(FATAL_ERROR "
-Unable to determine test submission files from TAG. Bailing out.
-"
- )
-ENDIF()
-FILE(GLOB _xml_files ${_path}/*.xml)
-EXECUTE_PROCESS(COMMAND sed -i -e
- s/CompilerName=\"\"/CompilerName=\"${_compiler_name}\"\\n\\tCompilerVersion=\"${_compiler_version}\"/g
- ${_xml_files}
- OUTPUT_QUIET RESULT_VARIABLE _res
- )
-IF(NOT "${_res}" STREQUAL "0")
- MESSAGE(FATAL_ERROR "
-\"sed\" failed. Bailing out.
-"
- )
-ENDIF()
-
-IF(NOT "${_svn_WC_REVISION}" STREQUAL "")
- FILE(WRITE ${_path}/Update.xml
-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
-<Update mode=\"Client\" Generator=\"ctest-${CTEST_VERSION}\">
- <Site>${CTEST_SITE}</Site>
- <BuildName>${CTEST_BUILD_NAME}</BuildName>
- <BuildStamp>${_tag}-${TRACK}</BuildStamp>
- <UpdateType>SVN</UpdateType>
- <Revision>${_svn_WC_REVISION}</Revision>
- <Path>${_branch}</Path>
-</Update>"
- )
-ENDIF()
-
-#
-# And finally submit:
-#
-
-CTEST_SUBMIT()
-
-# .oO( This script is freaky 456 lines long... )
+MESSAGE("-- Redirect to: ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/run_testsuite.cmake")
+INCLUDE(${CTEST_SOURCE_DIRECTORY}/cmake/scripts/run_testsuite.cmake)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
DEAL_II_PICKUP_TESTS()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_SLEPC)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_TRILINOS)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
-INCLUDE(${TEST_DIR}/cmake/setup_testsuite.cmake)
+INCLUDE(${DEAL_II_SOURCE_DIR}/cmake/setup_testsuite.cmake)
PROJECT(testsuite CXX)
INCLUDE(${DEAL_II_TARGET_CONFIG})
-DEAL_II_PICKUP_TESTS()
+IF(DEAL_II_WITH_UMFPACK)
+ DEAL_II_PICKUP_TESTS()
+ENDIF()