From: Matthias Maier Date: Sun, 20 Oct 2013 14:00:15 +0000 (+0000) Subject: Cleanup X-Git-Tag: v8.1.0~570^2~10 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4e4495ad8cfb99dc6f4ba2646efdf7aaf7951f9;p=dealii.git Cleanup git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31333 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/scripts/run_test.cmake b/deal.II/cmake/scripts/run_test.cmake index 4a27a36ee6..68f3a964f0 100644 --- a/deal.II/cmake/scripts/run_test.cmake +++ b/deal.II/cmake/scripts/run_test.cmake @@ -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) diff --git a/deal.II/tests/mesh_converter/CMakeLists.txt b/deal.II/tests/mesh_converter/CMakeLists.txt index 464e2714f4..9d1e80e293 100644 --- a/deal.II/tests/mesh_converter/CMakeLists.txt +++ b/deal.II/tests/mesh_converter/CMakeLists.txt @@ -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