From: Matthias Maier Date: Tue, 4 Jul 2023 20:34:08 +0000 (-0500) Subject: Tests: if no numdiff executable is found fall back to running tests instead of dropping X-Git-Tag: relicensing~746^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cae83518fa0b3c10bb5ea7581870c843004b3159;p=dealii.git Tests: if no numdiff executable is found fall back to running tests instead of dropping --- diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index 02b525109f..8a3e7e20c2 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -222,10 +222,13 @@ function(deal_ii_add_test _category _test_name _comparison_file) endif() # - # Determine whether the .run_only keyword is present: + # Determine whether the .run_only keyword is present. + # + # In case no numdiff executable was found we fall back to simply running + # the tests as well (but not comparing them). # set(_run_only FALSE) - if(_file MATCHES "\\.run_only$") + if(_file MATCHES "\\.run_only$" OR "${NUMDIFF_EXECUTABLE}" STREQUAL "") set(_run_only TRUE) endif() @@ -393,7 +396,7 @@ function(deal_ii_add_test _category _test_name _comparison_file) # "mpirun_0-threads_0". # - set(_test_target ${_category}.${_test_name}) # diff target name + set(_test_target ${_category}.${_test_name}) # diff/run target name set(_test_full ${_category}/${_test_name}) # full test name set(_test_directory ${CMAKE_CURRENT_BINARY_DIR}/${_test_name}.${_build_lowercase}) # directory to run the test in diff --git a/cmake/macros/macro_deal_ii_pickup_tests.cmake b/cmake/macros/macro_deal_ii_pickup_tests.cmake index be0234f7a2..a7a86592f3 100644 --- a/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -223,13 +223,7 @@ macro(deal_ii_pickup_tests) set(DEAL_II_SOURCE_DIR) # avoid a bogus warning - # Only run "*.output" comparison tests if we have numdiff: - set(_globs "*.output" "*.run_only") - if("${NUMDIFF_EXECUTABLE}" STREQUAL "") - set(_globs "*.run_only") - endif() - - file(GLOB _tests ${_globs}) + file(GLOB _tests "*.output" "*.run_only") foreach(_test ${_tests}) set(_comparison ${_test}) get_filename_component(_test ${_test} NAME)