]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Cleanup
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 19 Sep 2013 08:14:14 +0000 (08:14 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 19 Sep 2013 08:14:14 +0000 (08:14 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30822 0785d39b-7218-0410-832d-ea1e28bc413d

tests/CMakeLists.txt
tests/all-headers/CMakeLists.txt
tests/build_tests/CMakeLists.txt
tests/cmake/macros/macro_add_test.cmake
tests/cmake/macros/macro_pickup_tests.cmake

index ef3167c9ed7b2c4c72d359814e6170b9bc83b9fc..ed2a2748885ed9554113316cd01890169ba1cc3b 100644 (file)
 
 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")
   #
index 577973f9922f51f138bf852a1a2bd539c8361619..a43e407e9550dc1e7cfd4258c09ed1d808d58005 100644 (file)
@@ -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}")"
-  )
index d51e2e3989db8a8d3bb6f8b51516becc0c37b3e5..7b57999b32b6685437459a5dd8b0171c0537113d 100644 (file)
@@ -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}")"
-  )
index 89180d642fad12d1b2bb0951baeeaadc063a42eb..8342825aeaacde8493c1e6d89b0a6e409a0c2793 100644 (file)
@@ -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
index 882de983ba1d138273c3b16d5e13e306a46b216c..8d76d86be58b8aaf9b80e2ad1d43952e7f97b4a5 100644 (file)
 #     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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.