]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Port the build tests to ctest as well
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 15 Sep 2013 12:45:12 +0000 (12:45 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 15 Sep 2013 12:45:12 +0000 (12:45 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30711 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/CMakeLists.txt
deal.II/cmake/scripts/run_test.cmake
deal.II/examples/step-1/step-1.cc
deal.II/quick_tests/CMakeLists.txt [moved from deal.II/build_tests/CMakeLists.txt with 100% similarity]
deal.II/quick_tests/threads/affinity.cc [moved from deal.II/build_tests/threads/affinity.cc with 100% similarity]
tests/CMakeLists.txt
tests/all-headers/CMakeLists.txt

index 7dcd959cf023a57664c1169fa9aca93864aa7dce..9d92608c0b554ab42b75ca41e075346de0367427 100644 (file)
@@ -147,7 +147,8 @@ ADD_SUBDIRECTORY(cmake/config) # has to be included after source
 ADD_SUBDIRECTORY(contrib) # has to be included after source
 ADD_SUBDIRECTORY(examples)
 
-ADD_SUBDIRECTORY(build_tests)
+ADD_SUBDIRECTORY(quick_tests)
+
 IF(BUILD_TESTING AND DEAL_II_HAVE_TESTS_DIRECTORY)
   ADD_SUBDIRECTORY(${TEST_DIR} ${CMAKE_BINARY_DIR}/tests)
 ENDIF()
index 5f89255073955d49d4e6b6f3ae551d76867d10af..1955519fdf08c8bd1631ee0a60a867136ceeb3fe 100644 (file)
@@ -16,25 +16,42 @@ 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$")
+  #
+  IF(TRGT MATCHES "\\.diff$") # ordinary test:
     MESSAGE("${TEST}: BUILD successful.")
     MESSAGE("${TEST}: RUN successful.")
     MESSAGE("${TEST}: DIFF successful.")
     MESSAGE("${TEST}: PASSED.")
-  ELSE()
+  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 BUILD or RUN stages were run successfully:
+  # 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("${_build_regex}" STREQUAL "")
+  IF(NOT "${_configure_regex}" STREQUAL "")
+    SET(_stage CONFIGURE)
+  ELSEIF("${_build_regex}" STREQUAL "")
     SET(_stage BUILD)
   ELSEIF("${_run_regex}" STREQUAL "")
     SET(_stage RUN)
@@ -42,6 +59,7 @@ ELSE()
     SET(_stage DIFF)
   ENDIF()
 
+
   MESSAGE("Test ${TEST}: ${_stage}")
   MESSAGE("===============================   OUTPUT BEGIN  ===============================")
   IF("${_build_regex}" STREQUAL "")
index 09599c7935cfe09ca8a4a3096cd04aa67db8b250..96da272b2b7164633794c1664510b353897dd1a4 100644 (file)
@@ -16,7 +16,6 @@
 
  */
 
-
 // @sect3{Include files}
 
 // The most fundamental class in the library is the Triangulation class, which
index 18fa3125efd514febeaa21aaf86f10938448671a..f40ded87cecc023bf83dfecbfc253a854f41185c 100644 (file)
 ## ---------------------------------------------------------------------
 
 #
-# Setup and run the testsuite:
+# Setup the testsuite:
 #
-
 INCLUDE(setup_testsuite)
 
+#
+# And include all subdirectories:
+#
 MESSAGE(STATUS "")
 MESSAGE(STATUS "Proceed to test definitions now:")
 
-ADD_SUBDIRECTORY(a-framework)
+#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)
 
@@ -53,6 +57,7 @@ IF(DEAL_II_WITH_METIS)
   ADD_SUBDIRECTORY(metis)
 ENDIF()
 
+# TODO: Really with P4EST?
 IF(DEAL_II_WITH_MPI AND DEAL_II_WITH_P4EST)
   ADD_SUBDIRECTORY(gla)
   ADD_SUBDIRECTORY(mpi)
index 5ab714797b67d2506d5a3df697943f63763f6a3e..d525a5286eb3249612abce9a53788e100ed8c956 100644 (file)
@@ -42,8 +42,8 @@ FOREACH(_full_file ${_header})
   FOREACH(_build ${DEAL_II_BUILD_TYPES})
     STRING(TOLOWER ${_build} _build_lowercase)
 
-    SET(_test ${_category}-${_path}-${_file}.${_build_lowercase})
-
+    SET(_test ${_category}/${_path}/${_file}.${_build_lowercase})
+    SET(_target ${_category}-${_path}-${_file}.${_build_lowercase})
     #
     # Respect TEST_PICKUP_REGEX:
     #
@@ -53,18 +53,18 @@ FOREACH(_full_file ${_header})
       #
       # Add an object library for each header file and build configuration:
       #
-      ADD_LIBRARY(${_test} OBJECT EXCLUDE_FROM_ALL test_header.cc)
-      SET_TARGET_PROPERTIES(${_test} PROPERTIES
+      ADD_LIBRARY(${_target} OBJECT EXCLUDE_FROM_ALL test_header.cc)
+      SET_TARGET_PROPERTIES(${_target} PROPERTIES
         COMPILE_DEFINITIONS "${DEAL_II_DEFINITIONS};${DEAL_II_DEFINITIONS_${_build}}"
         COMPILE_FLAGS "${DEAL_II_CXX_FLAGS_${_build}}"
         )
-      SET_PROPERTY(TARGET ${_test} APPEND PROPERTY
+      SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
         INCLUDE_DIRECTORIES
           "${CMAKE_BINARY_DIR}/include"
           "${CMAKE_SOURCE_DIR}/include"
           "${CMAKE_SOURCE_DIR}/include/deal.II/"
         )
-      SET_PROPERTY(TARGET ${_test} APPEND PROPERTY
+      SET_PROPERTY(TARGET ${_target} APPEND PROPERTY
         COMPILE_DEFINITIONS
           HEADER=<deal.II/${_path}/${_file}>
         )
@@ -72,15 +72,15 @@ FOREACH(_full_file ${_header})
       #
       # And finally add the test:
       #
-      ADD_TEST(NAME ${_category}/${_path}/${_file}.${_build_lowercase}
+      ADD_TEST(NAME ${_test}
         COMMAND ${CMAKE_COMMAND}
-          -DTRGT=${_test}
+          -DTRGT=${_target}
           -DTEST=${_category}/${_path}/${_file}.${_build_lowercase}
           -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(${_category}/${_path}/${_file}.${_build_lowercase} PROPERTIES
+      SET_TESTS_PROPERTIES(${_test} PROPERTIES
         LABEL "${_category}"
         TIMEOUT ${TEST_TIME_LIMIT}
         )

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.