]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: Port to new repository layout
authorMatthias Maier <tamiko@kyomu.43-1.org>
Thu, 17 Jul 2014 23:20:26 +0000 (01:20 +0200)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 20 Jul 2014 22:49:31 +0000 (00:49 +0200)
Update run_testsuite.cmake and all places in the build system to the new
file system layout. Remove TESTS_DIR and hardwire ${CMAKE_SOURCE_DIR}/tests

CMakeLists.txt
cmake/scripts/run_testsuite.cmake
tests/CMakeLists.txt
tests/README
tests/run_testsuite.cmake
tests/submit_results.cmake

index 7105a2840626b94ea6c59d0ff8421a80879a8baf..e9b4e3a5eec6df4900084476df764bf8f9f6654b 100644 (file)
@@ -64,11 +64,7 @@ IF(EXISTS ${CMAKE_SOURCE_DIR}/doc/CMakeLists.txt)
   SET(DEAL_II_HAVE_DOC_DIRECTORY TRUE)
 ENDIF()
 
-IF(NOT DEFINED TEST_DIR)
-  GET_FILENAME_COMPONENT(TEST_DIR "${CMAKE_SOURCE_DIR}" PATH)
-  SET(TEST_DIR "${TEST_DIR}/tests")
-ENDIF()
-IF(EXISTS ${TEST_DIR}/CMakeLists.txt)
+IF(EXISTS ${CMAKE_SOURCE_DIR}/tests/CMakeLists.txt)
   SET(DEAL_II_HAVE_TESTS_DIRECTORY TRUE)
 ENDIF()
 
@@ -157,7 +153,9 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source
 ADD_SUBDIRECTORY(contrib) # has to be included after source
 ADD_SUBDIRECTORY(examples)
 
-ADD_SUBDIRECTORY(tests)
+IF(DEAL_II_HAVE_TESTS_DIRECTORY)
+  ADD_SUBDIRECTORY(tests)
+ENDIF()
 
 #
 # And finally, print the configuration:
index 0092c27029c69790adbea12e47ad9517e428ddc1..9883a278a7c0621cf3a2cf6693dc9a64f15a3495 100644 (file)
@@ -137,9 +137,8 @@ IF("${CTEST_SOURCE_DIRECTORY}" STREQUAL "")
   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.
+\"../../\" relative to the location of this script. Please, set
+CTEST_SOURCE_DIRECTORY manually to the appropriate source directory.
 "
       )
   ENDIF()
index a42a1f6bdad3dc433ea44bf7e0944fe871d9ab99..4fb9b299a5664cb30549950657e47e60acf97365 100644 (file)
@@ -37,7 +37,6 @@ ADD_SUBDIRECTORY(quick_tests)
 # CMAKE_BINARY_DIR/tests:
 #
 
-MESSAGE(STATUS "Testsuite will be set up with TEST_DIR=${TEST_DIR}")
 MESSAGE(STATUS "Setting up testsuite")
 
 FILE(WRITE ${CMAKE_BINARY_DIR}/CTestTestfile.cmake "SUBDIRS(tests)")
@@ -60,13 +59,12 @@ FOREACH(_var
   ENDIF()
 ENDFOREACH()
 
-#
-# Glob together a list of all subfolders to set up:
-#
-
-FILE(GLOB _categories RELATIVE ${TEST_DIR} ${TEST_DIR}/*)
-SET(_categories all-headers build_tests mesh_converter ${_categories})
-LIST(REMOVE_DUPLICATES _categories)
+SET(_categories
+  a-framework algorithms all-headers aniso base bits build_tests codim_one
+  deal.II distributed_grids fe gla grid hp integrators lac lapack manifold
+  matrix_free mesh_converter metis mpi multigrid mumps petsc serialization
+  slepc trilinos umfpack
+  )
 
 #
 # Custom targets for the testsuite:
@@ -85,52 +83,44 @@ ADD_CUSTOM_TARGET(regen_tests)
 ADD_CUSTOM_TARGET(clean_tests)
 
 FOREACH(_category ${_categories})
-  IF(EXISTS ${CMAKE_SOURCE_DIR}/tests/${_category}/CMakeLists.txt)
-    SET(_category_dir ${CMAKE_SOURCE_DIR}/tests/${_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_tests_${_category}
-      COMMAND ${CMAKE_COMMAND} -E make_directory
-        ${CMAKE_BINARY_DIR}/tests/${_category}
-      COMMAND cd ${CMAKE_BINARY_DIR}/tests/${_category} &&
-        ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_options} ${_category_dir}
-        > /dev/null
-      COMMENT "Processing tests/${_category}"
-      )
-    ADD_DEPENDENCIES(setup_tests setup_tests_${_category})
-
-    ADD_CUSTOM_TARGET(prune_tests_${_category}
-      COMMAND ${CMAKE_COMMAND} -E remove_directory
-        ${CMAKE_BINARY_DIR}/tests/${_category}
-      COMMENT "Processing tests/${_category}"
-      )
-    ADD_DEPENDENCIES(prune_tests prune_tests_${_category})
-
-    ADD_CUSTOM_TARGET(regen_tests_${_category}
-      COMMAND
-        test ! -d ${CMAKE_BINARY_DIR}/tests/${_category} || ${CMAKE_COMMAND}
-        --build ${CMAKE_BINARY_DIR}/tests/${_category} --target regenerate
-      COMMENT "Processing tests/${_category}"
-      )
-    ADD_DEPENDENCIES(regen_tests regen_tests_${_category})
-
-    ADD_CUSTOM_TARGET(clean_tests_${_category}
-      COMMAND
-        test ! -d ${CMAKE_BINARY_DIR}/tests/${_category} || ${CMAKE_COMMAND}
-        --build ${CMAKE_BINARY_DIR}/tests/${_category} --target clean
-      COMMENT "Processing tests/${_category}"
-      )
-    ADD_DEPENDENCIES(clean_tests clean_tests_${_category})
-
-    FILE(APPEND ${CMAKE_BINARY_DIR}/tests/CTestTestfile.cmake
-      "SUBDIRS(${_category})\n"
-      )
-  ENDIF()
+  SET(_category_dir ${CMAKE_SOURCE_DIR}/tests/${_category})
+
+  ADD_CUSTOM_TARGET(setup_tests_${_category}
+    COMMAND ${CMAKE_COMMAND} -E make_directory
+      ${CMAKE_BINARY_DIR}/tests/${_category}
+    COMMAND cd ${CMAKE_BINARY_DIR}/tests/${_category} &&
+      ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} ${_options} ${_category_dir}
+      > /dev/null
+    COMMENT "Processing tests/${_category}"
+    )
+  ADD_DEPENDENCIES(setup_tests setup_tests_${_category})
+
+  ADD_CUSTOM_TARGET(prune_tests_${_category}
+    COMMAND ${CMAKE_COMMAND} -E remove_directory
+      ${CMAKE_BINARY_DIR}/tests/${_category}
+    COMMENT "Processing tests/${_category}"
+    )
+  ADD_DEPENDENCIES(prune_tests prune_tests_${_category})
+
+  ADD_CUSTOM_TARGET(regen_tests_${_category}
+    COMMAND
+      test ! -d ${CMAKE_BINARY_DIR}/tests/${_category} || ${CMAKE_COMMAND}
+      --build ${CMAKE_BINARY_DIR}/tests/${_category} --target regenerate
+    COMMENT "Processing tests/${_category}"
+    )
+  ADD_DEPENDENCIES(regen_tests regen_tests_${_category})
+
+  ADD_CUSTOM_TARGET(clean_tests_${_category}
+    COMMAND
+      test ! -d ${CMAKE_BINARY_DIR}/tests/${_category} || ${CMAKE_COMMAND}
+      --build ${CMAKE_BINARY_DIR}/tests/${_category} --target clean
+    COMMENT "Processing tests/${_category}"
+    )
+  ADD_DEPENDENCIES(clean_tests clean_tests_${_category})
+
+  FILE(APPEND ${CMAKE_BINARY_DIR}/tests/CTestTestfile.cmake
+    "SUBDIRS(${_category})\n"
+    )
 ENDFOREACH()
 
 MESSAGE(STATUS "Setting up testsuite - Done")
index dfc75f80e9e70cc27d06f51d433bb0c06b33aa0d..7fbfbe1e990ebb5ff43a5797718cc709f80bd59c 100644 (file)
@@ -1,5 +1,5 @@
 Further information:
 
   The testsuite documentation is located at
-    ../deal.II/doc/developers/testsuite.html.
+    ../doc/developers/testsuite.html.
   Alternatively, have a look at http://www.dealii.org/
index 5efc0979e31c41772efd6fed56ca2ccbec280e6c..10c3f3692d91d6665fd6a0274564f4a9f544bc0c 100644 (file)
@@ -28,22 +28,16 @@ set CTEST_BINARY_DIRECTORY accordingly.
     )
 ENDIF()
 
-#
-# 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)
+  # was called residing under ./tests relative to the source directory.
+  GET_FILENAME_COMPONENT(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" PATH)
 ENDIF()
 
 IF(NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/cmake/scripts/run_testsuite.cmake)
   MESSAGE(FATAL_ERROR "
 Could not find a suitable source directory.
-There is no source directory \"../deal.II\" relative to the location of
+There is no source directory under \"../\" relative to the location of
 this script. Please, set CTEST_SOURCE_DIRECTORY manually to the appropriate
 source directory.
 "
index f3d2b416f284cb40130e1bf4f9d3dc3303885f5b..d6ff033a36322e2a3c43d3053e6c7a9437d1bdcb 100644 (file)
@@ -28,8 +28,7 @@
 #
 
 IF("${CTEST_SOURCE_DIRECTORY}" STREQUAL "")
-  GET_FILENAME_COMPONENT(_path "${CMAKE_CURRENT_LIST_DIR}" PATH)
-  SET(CTEST_SOURCE_DIRECTORY ${_path}/deal.II)
+  GET_FILENAME_COMPONENT(CTEST_SOURCE_DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" PATH)
   IF(NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake)
     SET(CTEST_SOURCE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
   ENDIF()

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.