]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: bugfix: do not pass an argument as environemt variable 14559/head
authorMatthias Maier <tamiko@43-1.org>
Sun, 11 Dec 2022 18:29:38 +0000 (12:29 -0600)
committerMatthias Maier <tamiko@43-1.org>
Sun, 11 Dec 2022 18:32:50 +0000 (12:32 -0600)
This fixes the runscript invocation on windows configurations

cmake/macros/macro_deal_ii_add_test.cmake
cmake/scripts/run_test.sh

index 835e6a1bc99b910acf6909d1b6b62b3dc2007d00..73c3cd6af46fd20e3c377d5350e2dda9d88d36a9 100644 (file)
@@ -467,9 +467,8 @@ function(deal_ii_add_test _category _test_name _comparison_file)
       #
 
       add_custom_command(OUTPUT ${_test_directory}/output
-        COMMAND TEST_N_THREADS=${_n_threads}
-          ${BASH} ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
-          run "${_test_full}" ${_run_args}
+        COMMAND ${BASH} ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/run_test.sh
+          run "${_test_full}" TEST_N_THREADS=${_n_threads} ${_run_args}
         COMMAND ${PERL_EXECUTABLE}
           -pi ${DEAL_II_PATH}/${DEAL_II_SHARE_RELDIR}/scripts/normalize.pl
           ${_test_directory}/output
index c3474979973eb565f0338c828772742da40be739..b3c58b6f4969884a6099f47b59cc7d796fcfe840 100644 (file)
@@ -53,6 +53,13 @@ case $STAGE in
     #    testsuite to explicitly set the number of threads in the header
     #    file tests.h.
     #
+
+    # Read in TEST_N_THREADS from command line:
+    if [[ $1 == TEST_N_THREADS=* ]]; then
+      TEST_N_THREADS="${1#TEST_N_THREADS=}"
+      shift
+    fi
+
     if [ "${TEST_N_THREADS:-0}" -ne 0 ]; then
       export DEAL_II_NUM_THREADS="${TEST_N_THREADS}"
       export TEST_N_THREADS

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.