]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Tests: if no numdiff executable is found fall back to running tests instead of dropping
authorMatthias Maier <tamiko@43-1.org>
Tue, 4 Jul 2023 20:34:08 +0000 (15:34 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 4 Jul 2023 20:38:10 +0000 (15:38 -0500)
cmake/macros/macro_deal_ii_add_test.cmake
cmake/macros/macro_deal_ii_pickup_tests.cmake

index 02b525109fa1ac621dbe2fb0ed3b728eccc6c8a0..8a3e7e20c23a49185ece3df7f47f3821abf34ec7 100644 (file)
@@ -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
 
index be0234f7a292eb81a56c329695c9d07206ef7247..a7a86592f33aa156e8a6626e10d0d96e2d919733 100644 (file)
@@ -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)

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.