ADD_SUBDIRECTORY(tests ${CMAKE_BINARY_DIR}/quick_tests)
-IF(DEAL_II_COMPONENT_TESTSUITE AND DEAL_II_HAVE_TESTS_DIRECTORY)
+IF(DEAL_II_HAVE_TESTS_DIRECTORY)
ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests)
ENDIF()
${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/binary
COMMAND ${CMAKE_COMMAND} -E touch
${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Config.cmake
+ COMMENT "Update build configuration"
)
ADD_DEPENDENCIES(library setup_build_dir)
#
# If 'variable' is empty it will be set to 'value'
#
-MACRO(SET_IF_EMPTY _variable _value)
+MACRO(SET_IF_EMPTY _variable)
IF("${${_variable}}" STREQUAL "")
- SET(${_variable} ${_value})
+ SET(${_variable} ${ARGN})
ENDIF()
ENDMACRO()
# DEAL_II_COMPONENT_EXAMPLES
# DEAL_II_COMPONENT_MESH_CONVERTER
# DEAL_II_COMPONENT_PARAMETER_GUI
-# DEAL_II_COMPONENT_TESTSUITE
# DEAL_II_FORCE_AUTODETECTION
#
# Options regarding compilation and linking:
OFF
)
-If(DEAL_II_HAVE_TESTS_DIRECTORY)
- OPTION(DEAL_II_COMPONENT_TESTSUITE
- "Enable the full regression testsuite."
- OFF
- )
-ENDIF()
-
OPTION(DEAL_II_ALLOW_AUTODETECTION
"Allow to automatically setup features by setting all undefined DEAL_II_WITH_* variables to ON or OFF"
ON
#
# Same for components:
#
- IF(_var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PARAMETER_GUI|TESTSUITE)")
+ IF(_var MATCHES "^(COMPAT_FILES|DOCUMENTATION|EXAMPLES|MESH_CONVERTER|PARAMETER_GUI)")
SET(DEAL_II_COMPONENT_${_var} ${${_var}} CACHE BOOL "" FORCE)
UNSET(${_var} CACHE)
ENDIF()
##
## ---------------------------------------------------------------------
-#
# Setup the testsuite:
-#
-INCLUDE(setup_testsuite)
+INCLUDE(cmake/setup_testsuite.cmake)
#
-# And include all subdirectories:
+# This is a bloody hack to avoid a severe performance regression with
+# GNU Make that really does not like 12k top level targets at once...
+#
+# 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 "Proceed to test definitions now:")
-
-#ADD_SUBDIRECTORY(a-framework) -- no idea what to do with that ...
-
-ADD_SUBDIRECTORY(all-headers)
-ADD_SUBDIRECTORY(aniso)
-ADD_SUBDIRECTORY(base)
-ADD_SUBDIRECTORY(bits)
-ADD_SUBDIRECTORY(build_tests)
-ADD_SUBDIRECTORY(codim_one)
-ADD_SUBDIRECTORY(deal.II)
-
-IF(DEAL_II_WITH_P4EST)
- ADD_SUBDIRECTORY(distributed_grids)
-ENDIF()
-#ADD_SUBDIRECTORY(fail) -- the good old failing tests
+MESSAGE(STATUS "Proceed to test definitions now.")
-ADD_SUBDIRECTORY(fe)
-ADD_SUBDIRECTORY(grid)
-ADD_SUBDIRECTORY(hp)
-ADD_SUBDIRECTORY(integrators)
-ADD_SUBDIRECTORY(lac)
+ADD_CUSTOM_TARGET(setup_test)
+ADD_CUSTOM_TARGET(cleanup_test)
+FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/deal.IITestfile.cmake "")
+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)
- ADD_SUBDIRECTORY(lapack)
+ LIST(APPEND _categories lapack)
ENDIF()
-
-ADD_SUBDIRECTORY(matrix_free)
-
IF(DEAL_II_WITH_METIS)
- ADD_SUBDIRECTORY(metis)
+ LIST(APPEND _categories metis)
ENDIF()
-
-# TODO: Really with P4EST?
IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
- ADD_SUBDIRECTORY(gla)
- ADD_SUBDIRECTORY(mpi)
+ LIST(APPEND _categories gla mpi)
+ENDIF()
+IF(DEAL_II_WITH_P4EST)
+ LIST(APPEND _categories distributed_grids)
ENDIF()
-
-ADD_SUBDIRECTORY(multigrid)
-
IF(DEAL_II_WITH_PETSC)
- ADD_SUBDIRECTORY(petsc)
+ LIST(APPEND _categories petsc)
ENDIF()
-
-ADD_SUBDIRECTORY(serialization)
-
IF(DEAL_II_WITH_SLEPC)
- ADD_SUBDIRECTORY(slepc)
+ LIST(APPEND _categories slepc)
ENDIF()
-
IF(DEAL_II_WITH_TRILINOS)
- ADD_SUBDIRECTORY(trilinos)
+ LIST(APPEND _categories trilinos)
ENDIF()
-
IF(DEAL_II_WITH_UMFPACK)
- ADD_SUBDIRECTORY(umfpack)
+ LIST(APPEND _categories umfpack)
ENDIF()
+FOREACH(_category ${_categories})
+ # avoid stale test definitions:
+ FILE(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${_category}/CTestTestfile.cmake)
+
+ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${_category}
+ COMMAND ${CMAKE_COMMAND} -E make_directory
+ ${CMAKE_CURRENT_BINARY_DIR}/${_category}
+ )
+ ADD_CUSTOM_TARGET(setup_test_${_category}
+ COMMAND ${CMAKE_COMMAND} -E make_directory
+ ${CMAKE_CURRENT_BINARY_DIR}/${_category}
+ COMMAND ${CMAKE_COMMAND}
+ -G${CMAKE_GENERATOR}
+ -DDEAL_II_DIR=${CMAKE_BINARY_DIR}
+ -DDEAL_II_SOURCE_DIR=${CMAKE_SOURCE_DIR}
+ -DTEST_CMAKE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/cmake # TODO: Refactor
+ -DTEST_DIFF="${TEST_DIFF}" # TODO: Refactor
+ -DTEST_PICKUP_REGEX=${TEST_PICKUP_REGEX} # TODO: Refactor
+ -DTEST_TIME_LIMIT=${TEST_TIME_LIMIT} # TODO: Refactor
+ ${CMAKE_CURRENT_SOURCE_DIR}/${_category}
+ > /dev/null # Shoo!
+ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_category}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${_category}
+ COMMENT "Processing ./tests/${_category}"
+ )
+ ADD_DEPENDENCIES(setup_test_${_category} library)
+ ADD_DEPENDENCIES(setup_test setup_test_${_category})
+
+ ADD_CUSTOM_TARGET(cleanup_test_${_category}
+ COMMAND ${CMAKE_COMMAND} -E remove_directory
+ ${CMAKE_CURRENT_BINARY_DIR}/${_category}
+ )
+ ADD_DEPENDENCIES(cleanup_test cleanup_test_${_category})
+
+ FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/deal.IITestfile.cmake
+ "SUBDIRS(${_category})\n"
+ )
+ENDFOREACH()
+
+SET_PROPERTY(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ APPEND PROPERTY TEST_INCLUDE_FILE deal.IITestfile.cmake
+ )
How to set up and run the testsuite
===================================
-To enable the testsuite, configure deal.II in a build directory with
+To enable the testsuite, configure and build deal.II in a build directory
+as normal (installation is not necessary). After that you can setup the
+tests via the "setup_test" target:
- # cmake -DTESTSUITE=ON .
+ # make setup_test
-After you have build deal.II as usual (installation is not necessary) you
-can run the testsuite in the _build directory_ via
+Now, the testsuite can be run in the _build directory_ via
# ctest [-j x]
----------------------------
It is possible to set up only a subset of tests that match a regular
-expression during configuration:
+expression during test setup.
- # cmake -DTESTSUITE=ON -DTEST_PICKUP_REGEX="<regular expression>" .
+ # make setup_test TEST_PICKUP_REGEX="<regular expression>"
-Note: If you wish to disable this filter again, undefine TEST_PICKUP_REGEX
-in the Cache:
+Alternatively, you can specify TEST_PICKUP_REGEX upon configuration:
+
+ # cmake -DTEST_PICKUP_REGEX="<regular expression"
+
+Note: A TEST_PICKUP_REGEX set via cmake always _overrides_ one set via
+environment. If you wish to disable this filter again, undefine
+TEST_PICKUP_REGEX in the Cache:
# cmake -UTEST_PICKUP_REGEX .
./base/data_out_base_povray
- Relocate all meshes in ./deal.II/*/ to ./deal.II/grids
+
+ - Fixup this big mess w.r.t. TEST_DIFF
##
## ---------------------------------------------------------------------
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
+
+SET_IF_EMPTY(TEST_PICKUP_REGEX "$ENV{TEST_PICKUP_REGEX}")
+
+SET(TEST_DIFF) # avoid a bogus warning
+
#
# Header tests are special:
#
#
SET(_category all-headers)
-MESSAGE(STATUS "Process ./tests/${_category}")
-FILE(GLOB_RECURSE _header ${CMAKE_SOURCE_DIR}/include/*.h)
+SET(_count "0")
+FILE(GLOB_RECURSE _header ${DEAL_II_SOURCE_DIR}/include/*.h)
FOREACH(_full_file ${_header})
GET_FILENAME_COMPONENT(_file ${_full_file} NAME)
# Add an object library for each header file and build configuration:
ADD_LIBRARY(${_target} OBJECT EXCLUDE_FROM_ALL test_header.cc)
- DEAL_II_INSOURCE_SETUP_TARGET(${_target} ${_build})
+
+ SET_TARGET_PROPERTIES(${_target} PROPERTIES
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
+ COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
+ COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
+ )
+ SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
+ INCLUDE_DIRECTORIES "${DEAL_II_INCLUDE_DIRS}"
+ )
SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
COMPILE_DEFINITIONS HEADER=<deal.II/${_path}/${_file}>
)
-DTRGT=${_target}
-DTEST=${_test}
-DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake
+ -P ${TEST_CMAKE_DIR}/scripts/run_test.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
SET_TESTS_PROPERTIES(${_test} PROPERTIES
LABEL "${_category}"
TIMEOUT ${TEST_TIME_LIMIT}
)
+ MATH(EXPR _count "${_count}+1")
ENDIF()
ENDFOREACH()
ENDFOREACH()
-MESSAGE(STATUS "Process ./tests/${_category} - Done")
+MESSAGE(STATUS
+ "Testsuite: Set up ${_count} regression tests in category ${_category}."
+ )
+MESSAGE(STATUS
+ " (Timeout: ${TEST_TIME_LIMIT}, Diff: "${_test_diff}")"
+ )
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
##
## ---------------------------------------------------------------------
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
+
+SET_IF_EMPTY(TEST_PICKUP_REGEX "$ENV{TEST_PICKUP_REGEX}")
+
+#
+# avoid bogus warnings:
+#
+SET(TEST_DIFF)
+
#
# build_tests tests are special:
#
#
SET(_category build_tests)
-MESSAGE(STATUS "Process ./tests/${_category}")
# Run a minimalistic set of steps in debug configuration:
SET(_debug_steps
step-47 step-48 step-49
)
-FILE(GLOB _steps ${CMAKE_SOURCE_DIR}/examples/step-*)
+SET(_count "0")
+FILE(GLOB _steps ${DEAL_II_SOURCE_DIR}/examples/step-*)
FOREACH(_step_full ${_steps})
GET_FILENAME_COMPONENT(_step ${_step_full} NAME)
-DTRGT=${_target}
-DTEST=${_test}
-DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake
+ -P ${TEST_CMAKE_DIR}/scripts/run_test.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
SET_TESTS_PROPERTIES(${_test} PROPERTIES
LABEL "${_category}"
TIMEOUT ${TEST_TIME_LIMIT}
)
+ MATH(EXPR _count "${_count}+1")
ENDIF()
ENDFOREACH()
ENDFOREACH()
-MESSAGE(STATUS "Process ./tests/${_category} - Done")
+MESSAGE(STATUS
+ "Testsuite: Set up ${_count} regression tests in category ${_category}."
+ )
+MESSAGE(STATUS
+ " (Timeout: ${TEST_TIME_LIMIT}, Diff: "${_test_diff}")"
+ )
## ---------------------------------------------------------------------
#
-# A Macro to set up tests for thes testsuite
+# A Macro to set up tests for the testsuite
#
# The following variables must be set:
#
# - specifying the maximal wall clock time in seconds a test is allowed
# to run
#
+# TEST_CMAKE_DIR
+# - pointing to a cmake folder where normalize.pl and run_test.cmake are
+# located
+#
#
# Usage:
# DEAL_II_ADD_TEST(category test_name comparison_file n_cpu [configurations])
MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file _n_cpu)
+ IF(NOT DEAL_II_PROJECT_CONFIG_INCLUDED)
+ MESSAGE(FATAL_ERROR
+ "\nDEAL_II_ADD_TEST can only be called in external test subprojects after "
+ "the inclusion of deal.IIConfig.cmake. It is not intended for "
+ "internal use.\n\n"
+ )
+ ENDIF()
+
FOREACH(_build ${DEAL_II_BUILD_TYPES})
ITEM_MATCHES(_match "${_build}" ${ARGN})
# only add the target once
ADD_EXECUTABLE(${_target} EXCLUDE_FROM_ALL ${_test_name}.cc)
- DEAL_II_INSOURCE_SETUP_TARGET(${_target} ${_build})
+
+ SET_TARGET_PROPERTIES(${_target} PROPERTIES
+ LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
+ COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
+ COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
+ LINKER_LANGUAGE "CXX"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${_test_short}"
+ )
+ SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
+ INCLUDE_DIRECTORIES "${DEAL_II_INCLUDE_DIRS}"
+ )
SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
COMPILE_DEFINITIONS
SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}"
)
+ TARGET_LINK_LIBRARIES(${_target} ${DEAL_II_TARGET})
ENDIF()
#
&& exit 1)
COMMAND
${PERL_EXECUTABLE} -pi
- ${CMAKE_SOURCE_DIR}/cmake/scripts/normalize.pl
+ ${TEST_CMAKE_DIR}/scripts/normalize.pl
${_test_directory}/output
WORKING_DIRECTORY
${_test_directory}
DEPENDS
${_target}
- ${CMAKE_SOURCE_DIR}/cmake/scripts/normalize.pl
+ ${TEST_CMAKE_DIR}/scripts/normalize.pl
)
ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/diff
COMMAND
-DTRGT=${_diff_target}
-DTEST=${_test_full}
-DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
- -P ${CMAKE_SOURCE_DIR}/cmake/scripts/run_test.cmake
+ -P ${TEST_CMAKE_DIR}/scripts/run_test.cmake
WORKING_DIRECTORY ${_test_directory}
)
SET_TESTS_PROPERTIES(${_test_full} PROPERTIES
--- /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()
+
# DEAL_II_PICKUP_TESTS()
#
+IF(NOT DEFINED SET_IF_EMPTY)
+ MACRO(SET_IF_EMPTY _variable)
+ IF("${${_variable}}" STREQUAL "")
+ SET(${_variable} ${ARGN})
+ ENDIF()
+ ENDMACRO()
+ENDIF()
+
MACRO(DEAL_II_PICKUP_TESTS)
+ SET_IF_EMPTY(TEST_PICKUP_REGEX "$ENV{TEST_PICKUP_REGEX}")
+
GET_FILENAME_COMPONENT(_category ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- MESSAGE(STATUS "Process ./tests/${_category}")
+ #
+ # Strip the quoting from TEST_DIFF:
+ #
+ SET(_test_diff ${TEST_DIFF})
+ SEPARATE_ARGUMENTS(TEST_DIFF UNIX_COMMAND ${TEST_DIFF})
+ SET(DEAL_II_SOURCE_DIR) # avoid a bogus warning
+
+ SET(_count "0")
FILE(GLOB _tests "*.output")
FOREACH(_test ${_tests})
SET(_comparison ${_test})
ENDIF()
ENDFOREACH()
-
IF(_define_test)
-
#
# Determine whether the test should be run with mpirun:
#
IF(_test MATCHES debug)
SET(_configuration DEBUG)
+ MATH(EXPR _count "${_count}+1")
ELSEIF(_test MATCHES release)
SET(_configuration RELEASE)
+ MATH(EXPR _count "${_count}+1")
ELSE()
SET(_configuration)
+ MATH(EXPR _count "${_count}+2")
ENDIF()
STRING(REGEX REPLACE "\\..*" "" _test ${_test})
DEAL_II_ADD_TEST(${_category} ${_test} ${_comparison} ${_n_cpu} ${_configuration})
ENDIF()
-
ENDFOREACH()
- MESSAGE(STATUS "Process ./tests/${_category} - Done")
-
+ MESSAGE(STATUS
+ "Testsuite: Set up ${_count} regression tests in category ${_category}."
+ )
+ MESSAGE(STATUS
+ " (Timeout: ${TEST_TIME_LIMIT}, Diff: "${_test_diff}")"
+ )
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
+#
+# TODO: The following variables have to be set:
+#
+# TARGET
+# TEST
+# DEAL_II_BINARY_DIR
+#
+
+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:
+ #
+ 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("=============================== 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})
+ STRING(REGEX MATCH "${TEST}: BUILD successful\\." _build_regex ${_output})
+ STRING(REGEX MATCH "${TEST}: RUN successful\\." _run_regex ${_output})
+ IF(NOT "${_configure_regex}" 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 "")
+ # Some special output in case the BUILD stage failed:
+ MESSAGE("${TEST}: BUILD failed. Output:")
+ ENDIF()
+ MESSAGE(${_output})
+ MESSAGE("")
+ MESSAGE("${TEST}: ****** ${_stage} failed *******")
+ MESSAGE("")
+ MESSAGE("=============================== OUTPUT END ===============================")
+ MESSAGE(FATAL_ERROR "*** abort")
+
+ENDIF()
--- /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.
+##
+## ---------------------------------------------------------------------
+
+#
+# Load all macros:
+#
+
+FILE(GLOB _macro_files "${CMAKE_CURRENT_LIST_DIR}/macros/*.cmake")
+FOREACH(_file ${_macro_files})
+ INCLUDE(${_file})
+ENDFOREACH()
#
#
-# We need perl for the testsuite:
-#
-
-FIND_PACKAGE(Perl)
-IF(NOT PERL_FOUND)
- MESSAGE(FATAL_ERROR
- "Could not find a perl installation which is required for running the test suite"
- )
-ENDIF()
-
-#
-# And a diff tool, preferably numdiff:
+# Wee need a diff tool, preferably numdiff:
#
FIND_PROGRAM(NUMDIFF_EXECUTABLE
ENDIF()
IF(NOT NUMDIFF_EXECUTABLE MATCHES "-NOTFOUND")
- SET_IF_EMPTY(TEST_DIFF ${NUMDIFF_EXECUTABLE} -a 1e-6 -q -s ' \t\n:')
+ SET_IF_EMPTY(TEST_DIFF "${NUMDIFF_EXECUTABLE} -a 1e-6 -q")
ELSE()
- SET_IF_EMPTY(TEST_DIFF ${DIFF_EXECUTABLE})
+ SET_IF_EMPTY(TEST_DIFF "${DIFF_EXECUTABLE}")
ENDIF()
+#
+# Son, we have to talk about quotings:
+#
+SEPARATE_ARGUMENTS(TEST_DIFF UNIX_COMMAND ${TEST_DIFF})
MARK_AS_ADVANCED(DIFF_EXECUTABLE NUMDIFF_EXECUTABLE)
#
-# Set a default time limit of 60 seconds:
+# Set a default time limit of 120 seconds:
#
-
SET_IF_EMPTY(TEST_TIME_LIMIT 120)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+++ /dev/null
-#!/bin/sh
-
-######################################################################
-# Find equal reference files
-#
-# Called from one of the top level test directories, finds all doubled
-# reference files in */cmp and outputs them for possible removal.
-#
-######################################################################
-
-# go through all files
-for dir in *; do
- # if file is a directory,
- if ! test -d $dir; then continue; fi
- # change to the subdirectory with reference files
- cd $dir/cmp
-
- # now diff all possible combinations and
- # write a line if files are equal.
- for file in *; do
- for cmp in *; do
- if test "$file" = "$cmp"; then break; fi
- if diff -q $file $cmp &> /dev/null ; then
- echo "$dir $file $cmp equal"
- fi
- done
- done
- cd ../..
- done
+++ /dev/null
-######################################################################
-# $Id$
-# Copyright 2005 by the deal.II authors
-#
-######################################################################
-# Extracts xfig and eps files from the output of
-# bits/grid_generator_01.exe
-######################################################################
-# call:
-# perl thisfile outpufile
-######################################################################
-
-# Just open it in order to be able to close it
-open OUT, ">0d-void.eps";
-
-while (<>)
-{
- if (m/DEAL:(\d)d-GridTest::(.+)/)
- {
- my $name = $2;
- $name .= ".eps" if ($1==1);
- $name .= ".fig" if ($1==2);
- $name .= ".eps" if ($1==3);
- close OUT;
- open OUT, ">$1d-$name\n";
- next;
- }
- print OUT;
-}
+++ /dev/null
-#!/bin/perl
-
-use strict;
-
-my $path = '.';
-my $revision;
-my $id;
-my $date;
-
-while(<>)
-{
- if (m/^Date:\s*(\d+)\s+(\d+)/)
- {
- my $name = sprintf("%s/%04d-%03d", $path, $1, $2);
-# print $name;
- }
- $revision = $1 if (m/^Revision:\s*(\d+)/);
- $id = $1 . $2 if (m/^Id:\s*(\S+)\s+(\S+)?\n/);
- if (m/^\d\d\d\d-\d\d-\d\d \d\d:\d\d/)
- {
- chop;
- s/\s+/ /g;
- s/ \+ / 4 /;
- print "$revision $_ $id\n"
- }
-}
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8)
+FIND_PACKAGE(deal.II 8.1 REQUIRED HINTS ${DEAL_II_DIR})
+FIND_PACKAGE(Perl REQUIRED)
+INCLUDE(${TEST_CMAKE_DIR}/setup_macros.cmake)
+ENABLE_TESTING()
DEAL_II_PICKUP_TESTS()