]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bugfix: Quote paths in run_test.sh
authorMatthias Maier <tamiko@43-1.org>
Fri, 6 Jan 2017 19:40:29 +0000 (13:40 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 6 Jan 2017 19:51:08 +0000 (13:51 -0600)
This fixes a long outstanding regression with the testsuite in
combination with paths containing spaces.

cmake/scripts/run_test.sh

index 897e4ca7b2a5a2b40952c2a8755152fc0e877a6f..23fbc358584c3e79f635e3a52adc2b6b8f49e232 100644 (file)
@@ -44,7 +44,7 @@ run(){
   rm -f output
   rm -f stdout
 
-  ${RUN_COMMAND} > stdout 2>&1
+  "${RUN_COMMAND}" > stdout 2>&1
   RETURN_VALUE=$?
 
   [ -f output ] || mv stdout output
@@ -79,16 +79,16 @@ diff() {
   #
   for file in "${COMPARISON_FILE}"*; do
     # determine variant name (empty string for main comparison file):
-    variant=${file#*.output}
+    variant="${file#*.output}"
 
     #
     # Run diff or numdiff (if available) to determine whether files are the
     # same. Create a diff file "diff${variant}" for each variant file that
     # is found (including the main comparison file).
     #
-    case ${NUMDIFF_EXECUTABLE} in
+    case "${NUMDIFF_EXECUTABLE}" in
       *numdiff*)
-        ${NUMDIFF_EXECUTABLE} -a 1e-6 -r 1e-8 -s ' \t\n:<>=,;' \
+        "${NUMDIFF_EXECUTABLE}" -a 1e-6 -r 1e-8 -s ' \t\n:<>=,;' \
                               "${file}" output > diff${variant}
         ;;
       *)

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.