From: Matthias Maier Date: Thu, 19 Sep 2013 08:14:14 +0000 (+0000) Subject: Cleanup X-Git-Tag: v8.1.0~570^2~271 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41b8934fec8ca3006b18237896479a145476983e;p=dealii.git Cleanup git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30822 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ef3167c9ed..ed2a274888 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -25,9 +25,14 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8) MESSAGE(STATUS "Proceed to test definitions now.") -PROJECT(deal.II-testsuite NONE) 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() + SET(_options) IF("${CMAKE_PROJECT_NAME}" STREQUAL "deal.II") # diff --git a/tests/all-headers/CMakeLists.txt b/tests/all-headers/CMakeLists.txt index 577973f992..a43e407e95 100644 --- a/tests/all-headers/CMakeLists.txt +++ b/tests/all-headers/CMakeLists.txt @@ -29,22 +29,7 @@ INCLUDE(${DEAL_II_TARGET_CONFIG}) SET(_category all-headers) -SET(_count "0") - -IF(NOT "${DEAL_II_SOURCE_DIR}" STREQUAL "") - # The testsuite was configured as part of a deal.II project, so pick up - # the headers from the corresponding source directory: - FILE(GLOB_RECURSE _header ${DEAL_II_SOURCE_DIR}/include/deal.II/*.h) -ELSE() - # The testsuite was configured as an independent project, so pick up - # headers from an external deal.II build directory, or installation: - IF(DEAL_II_BUILD_DIR) - LIST(GET DEAL_II_INCLUDE_DIRS 2 _header_dir) - ELSE() - LIST(GET DEAL_II_INCLUDE_DIRS 0 _header_dir) - ENDIF() - FILE(GLOB_RECURSE _header ${_header_dir}/deal.II/*.h) -ENDIF() +FILE(GLOB_RECURSE _header ${DEAL_II_SOURCE_DIR}/include/deal.II/*.h) FOREACH(_full_file ${_header}) GET_FILENAME_COMPONENT(_file ${_full_file} NAME) @@ -94,14 +79,6 @@ FOREACH(_full_file ${_header}) LABEL "${_category}" TIMEOUT ${TEST_TIME_LIMIT} ) - MATH(EXPR _count "${_count}+1") ENDIF() ENDFOREACH() ENDFOREACH() - -MESSAGE(STATUS - "Testsuite: Set up ${_count} regression tests in category ${_category}." - ) -MESSAGE(STATUS - " (Timeout: ${TEST_TIME_LIMIT}, Diff: "${_test_diff}")" - ) diff --git a/tests/build_tests/CMakeLists.txt b/tests/build_tests/CMakeLists.txt index d51e2e3989..7b57999b32 100644 --- a/tests/build_tests/CMakeLists.txt +++ b/tests/build_tests/CMakeLists.txt @@ -46,18 +46,8 @@ SET(_release_steps step-47 step-48 step-49 ) -IF(NOT "${DEAL_II_SOURCE_DIR}" STREQUAL "") - # The testsuite was configured as part of a deal.II project, so pick up - # the steps rom the corresponding source directory: - FILE(GLOB _steps ${DEAL_II_SOURCE_DIR}/examples/step-*) -ELSE() - # The testsuite was configured as an independent project, so pick up - # headers from an external deal.II build directory, or installation: - FILE(GLOB _steps ${DEAL_II_PATH}/${DEAL_II_EXAMPLES_RELDIR}/step-*) - # TODO: What do in case of a build dir? -ENDIF() - -SET(_count "0") +FILE(GLOB _steps ${DEAL_II_SOURCE_DIR}/examples/step-*) + FOREACH(_step_full ${_steps}) GET_FILENAME_COMPONENT(_step ${_step_full} NAME) @@ -173,15 +163,7 @@ FOREACH(_step_full ${_steps}) LABEL "${_category}" TIMEOUT ${TEST_TIME_LIMIT} ) - MATH(EXPR _count "${_count}+1") ENDIF() ENDFOREACH() ENDFOREACH() - -MESSAGE(STATUS - "Testsuite: Set up ${_count} regression tests in category ${_category}." - ) -MESSAGE(STATUS - " (Timeout: ${TEST_TIME_LIMIT}, Diff: "${_test_diff}")" - ) diff --git a/tests/cmake/macros/macro_add_test.cmake b/tests/cmake/macros/macro_add_test.cmake index 89180d642f..8342825aea 100644 --- a/tests/cmake/macros/macro_add_test.cmake +++ b/tests/cmake/macros/macro_add_test.cmake @@ -135,9 +135,8 @@ MACRO(DEAL_II_ADD_TEST _category _test_name _comparison_file _n_cpu) && cat ${_test_directory}/failing_output && exit 1) COMMAND - ${PERL_EXECUTABLE} -pi - ${TEST_DIR}/cmake/scripts/normalize.pl - ${_test_directory}/output + ${PERL_EXECUTABLE} -pi ${TEST_DIR}/cmake/scripts/normalize.pl + ${_test_directory}/output WORKING_DIRECTORY ${_test_directory} DEPENDS diff --git a/tests/cmake/macros/macro_pickup_tests.cmake b/tests/cmake/macros/macro_pickup_tests.cmake index 882de983ba..8d76d86be5 100644 --- a/tests/cmake/macros/macro_pickup_tests.cmake +++ b/tests/cmake/macros/macro_pickup_tests.cmake @@ -24,34 +24,19 @@ # 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) - # - # Strip the quoting from TEST_DIFF: - # - SET(_test_diff ${TEST_DIFF}) - SET(DEAL_II_SOURCE_DIR) # avoid a bogus warning - SET(_count "0") FILE(GLOB _tests "*.output") FOREACH(_test ${_tests}) SET(_comparison ${_test}) # - # Respect TEST_PICKUP_REGEX: Make sure we are allowed to pickup this - # test: + # Respect TEST_PICKUP_REGEX: # IF( "${TEST_PICKUP_REGEX}" STREQUAL "" OR _test MATCHES "${TEST_PICKUP_REGEX}" ) @@ -74,7 +59,6 @@ MACRO(DEAL_II_PICKUP_TESTS) _feature ${_match} ) STRING(TOUPPER ${_feature} _feature) - STRING(REGEX MATCH "(on|off|yes|no|true|false)$" _boolean ${_match}) IF( (DEAL_II_${_feature} AND NOT ${_boolean}) OR @@ -97,24 +81,14 @@ MACRO(DEAL_II_PICKUP_TESTS) 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 - "Testsuite: Set up ${_count} regression tests in category ${_category}." - ) - MESSAGE(STATUS - " (Timeout: ${TEST_TIME_LIMIT}, Diff: "${_test_diff}")" - ) ENDMACRO()