From: Matthias Maier Date: Tue, 4 Jul 2023 20:45:48 +0000 (-0500) Subject: Tests: set expected stage to »PASSED« when not comparing output and expect=DIFF X-Git-Tag: relicensing~746^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08751f67c8a7dab953132328870b116585c1bf10;p=dealii.git Tests: set expected stage to »PASSED« when not comparing output and expect=DIFF --- diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index 8a3e7e20c2..40ede17232 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -210,6 +210,17 @@ function(deal_ii_add_test _category _test_name _comparison_file) return() endif() + # + # 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$" OR "${NUMDIFF_EXECUTABLE}" STREQUAL "") + set(_run_only TRUE) + endif() + # # Determine the expected build stage of this test: # @@ -222,14 +233,11 @@ function(deal_ii_add_test _category _test_name _comparison_file) endif() # - # 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). + # If _run_only is set then we don't compare test results. Therefore, + # we won't fail in the "DIFF" stage of a test. # - set(_run_only FALSE) - if(_file MATCHES "\\.run_only$" OR "${NUMDIFF_EXECUTABLE}" STREQUAL "") - set(_run_only TRUE) + if(_run_only AND "${_expect}" STREQUAL "DIFF") + set(_expect "PASSED") endif() #