]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: Also output stdout/stderr in case of a regular output file 1248/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 4 Aug 2015 02:43:23 +0000 (21:43 -0500)
committerMatthias Maier <tamiko@43-1.org>
Tue, 4 Aug 2015 04:57:10 +0000 (23:57 -0500)
Also output everything a script piped to stdout and stderr in case a test
fails to run.

cmake/scripts/run_test.sh

index 229d7a66a92fb8c118c041c6f7bb57b360acd779..9a2ff609ff0cc0b3e51c2c24dea04750f6dd65a2 100644 (file)
@@ -39,12 +39,12 @@ COMPARISON_FILE="$6"
 run(){
   rm -f failing_output
   rm -f output
+  rm -f stdout
 
   ${RUN_COMMAND} > stdout 2>&1
   RETURN_VALUE=$?
 
-  [ -f output ] || cp stdout output
-  rm -f stdout
+  [ -f output ] || mv stdout output
 
   if [ $RETURN_VALUE -ne 0 ]; then
     mv output failing_output
@@ -53,6 +53,12 @@ run(){
     echo "${TEST_FULL}: RUN failed. ------ Result: `pwd`/failing_output"
     echo "${TEST_FULL}: RUN failed. ------ Partial output:"
     cat failing_output
+    if [ -f stdout ]; then
+      echo ""
+      echo "${TEST_FULL}: RUN failed. ------ Additional output on stdout/stderr:"
+      echo ""
+      cat stdout
+    fi
     exit 1
   fi
 }

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.