From: Matthias Maier Date: Sun, 11 Dec 2022 06:55:03 +0000 (-0600) Subject: Tests: Use find_package(UnixCommands) to detect a suitable shell X-Git-Tag: v9.5.0-rc1~734^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=363a07550557b64571e27f0ccdf9531ad969d7c5;p=dealii.git Tests: Use find_package(UnixCommands) to detect a suitable shell --- diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index 113e550ca3..835e6a1bc9 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -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 diff --git a/cmake/macros/macro_deal_ii_pickup_tests.cmake b/cmake/macros/macro_deal_ii_pickup_tests.cmake index 85b43937ef..e81c90080a 100644 --- a/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -85,6 +85,11 @@ endmacro() macro(deal_ii_pickup_tests) + # + # Find bash and perl interpreter: + # + + find_package(UnixCommands REQUIRED) find_package(Perl REQUIRED) #