]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Tests: set expected stage to »PASSED« when not comparing output and expect=DIFF 15651/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 4 Jul 2023 20:45:48 +0000 (15:45 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 4 Jul 2023 20:48:02 +0000 (15:48 -0500)
cmake/macros/macro_deal_ii_add_test.cmake

index 8a3e7e20c23a49185ece3df7f47f3821abf34ec7..40ede17232d7a44eeb53755b4f76282514dd94fe 100644 (file)
@@ -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()
 
   #

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.