]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Tests: Use find_package(UnixCommands) to detect a suitable shell
authorMatthias Maier <tamiko@43-1.org>
Sun, 11 Dec 2022 06:55:03 +0000 (00:55 -0600)
committerMatthias Maier <tamiko@43-1.org>
Sun, 11 Dec 2022 07:03:10 +0000 (01:03 -0600)
cmake/macros/macro_deal_ii_add_test.cmake
cmake/macros/macro_deal_ii_pickup_tests.cmake

index 113e550ca389617684c42352afa7d22ee3f8b768..835e6a1bc99b910acf6909d1b6b62b3dc2007d00 100644 (file)
@@ -65,6 +65,9 @@
 #
 # The following variables must be set:
 #
+#  BASH
+#     - Complete path to the bash shell.
+#
 #   NUMDIFF_EXECUTABLE
 #     - Complete path to the numdiff binary.
 #
@@ -465,7 +468,7 @@ function(deal_ii_add_test _category _test_name _comparison_file)
 
       add_custom_command(OUTPUT ${_test_directory}/output
         COMMAND TEST_N_THREADS=${_n_threads}
-          sh ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
+          ${BASH} ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
           run "${_test_full}" ${_run_args}
         COMMAND ${PERL_EXECUTABLE}
           -pi ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/normalize.pl
@@ -492,7 +495,7 @@ function(deal_ii_add_test _category _test_name _comparison_file)
         file(GLOB _comparison_files ${_comparison_file} ${_comparison_file}.*)
 
         add_custom_command(OUTPUT ${_test_directory}/diff
-          COMMAND sh ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
+          COMMAND ${BASH} ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
             diff "${_test_full}" "${NUMDIFF_EXECUTABLE}"
             "${_comparison_file}" ${_run_args}
           WORKING_DIRECTORY
index 85b43937ef6c7c4b443333c01652a168e1464da0..e81c90080afc6948ff73fd3fb0f68ce1e62474a8 100644 (file)
@@ -85,6 +85,11 @@ endmacro()
 
 
 macro(deal_ii_pickup_tests)
+  #
+  # Find bash and perl interpreter:
+  #
+
+  find_package(UnixCommands REQUIRED)
   find_package(Perl REQUIRED)
 
   #

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.