]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Cleanup
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 20 Oct 2013 14:00:15 +0000 (14:00 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 20 Oct 2013 14:00:15 +0000 (14:00 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31333 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/scripts/run_test.cmake
deal.II/tests/mesh_converter/CMakeLists.txt

index 4a27a36ee671dc7d9641077848530eb04caf0059..68f3a964f00b311ccf0edbf5d9cb4a0e5c56e5ce 100644 (file)
@@ -48,10 +48,11 @@ ELSE()
   STRING(REGEX MATCH "${TEST}: CONFIGURE successful\\." _configure_regex ${_output})
   STRING(REGEX MATCH "${TEST}: CONFIGURE failed\\." _configure_regex_fail ${_output})
   STRING(REGEX MATCH "${TEST}: BUILD successful\\." _build_regex ${_output})
+  STRING(REGEX MATCH "${TEST}: RUN failed\\." _run_regex_fail ${_output})
   STRING(REGEX MATCH "${TEST}: RUN successful\\." _run_regex ${_output})
   IF(NOT "${_configure_regex_fail}" STREQUAL "")
     SET(_stage CONFIGURE)
-  ELSEIF("${_build_regex}" STREQUAL "")
+  ELSEIF("${_build_regex}" STREQUAL "" AND "${_run_regex_fail}" STREQUAL "")
     SET(_stage BUILD)
   ELSEIF("${_run_regex}" STREQUAL "")
     SET(_stage RUN)
index 464e2714f42d35d6b2b3056a89653dd35ca0ed73..9d1e80e293be1fe631ce37ea54973188ce7fdb2e 100644 (file)
@@ -31,12 +31,10 @@ FOREACH(_full_file ${_meshes})
   GET_FILENAME_COMPONENT(_mesh ${_full_file} NAME_WE)
 
   SET(_test_full ${_category}/${_mesh})
-  SET(_target ${_mesh})
-  SET(_diff_target ${_target}.diff)
-  SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_target}) # directory to run the test in
-
+  SET(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_mesh}) # directory to run the test in
   STRING(REGEX REPLACE "\\.inp$" ".ucd" _comparison_file ${_full_file})
 
+  # Is this a 3D or 2D mesh?
   SET(_dim 3)
   IF(_full_file MATCHES "meshes/2d")
     SET(_dim 2)
@@ -48,10 +46,6 @@ FOREACH(_full_file ${_meshes})
 
     FILE(MAKE_DIRECTORY ${_test_directory})
 
-    #
-    # Add a top level target to run and compare the test:
-    #
-
     ADD_CUSTOM_COMMAND(OUTPUT ${_test_directory}/output
       COMMAND rm -f ${_test_directory}/failing_output
       COMMAND touch ${_test_directory}/output
@@ -73,10 +67,7 @@ FOREACH(_full_file ${_meshes})
       COMMAND rm -f ${_test_directory}/failing_diff
       COMMAND touch ${_test_directory}/diff
       COMMAND
-        ${TEST_DIFF}
-          ${_test_directory}/output
-          ${_comparison_file}
-          > ${_test_directory}/diff
+        ${TEST_DIFF} ${_test_directory}/output ${_comparison_file} > ${_test_directory}/diff
         || (mv ${_test_directory}/diff
                ${_test_directory}/failing_diff
             && echo "${_test_full}: RUN successful."
@@ -92,20 +83,16 @@ FOREACH(_full_file ${_meshes})
         ${_comparison_file}
       )
 
-    ADD_CUSTOM_TARGET(${_diff_target} DEPENDS ${_test_directory}/diff
+    ADD_CUSTOM_TARGET(${_mesh}.diff DEPENDS ${_test_directory}/diff
       COMMAND
            echo "${_test_full}: RUN successful."
         && echo "${_test_full}: DIFF successful."
         && echo "${_test_full}: PASSED."
       )
 
-    #
-    # And finally add the test:
-    #
-
     ADD_TEST(NAME ${_test_full}
       COMMAND ${CMAKE_COMMAND}
-        -DTRGT=${_diff_target}
+        -DTRGT=${_mesh}.diff
         -DTEST=${_test_full}
         -DDEAL_II_BINARY_DIR=${CMAKE_BINARY_DIR}
         -P ${DEAL_II_SOURCE_DIR}/cmake/scripts/run_test.cmake

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.