From: Matthias Maier Date: Tue, 4 Aug 2015 02:43:23 +0000 (-0500) Subject: Testsuite: Also output stdout/stderr in case of a regular output file X-Git-Tag: v8.4.0-rc2~686^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11b62d449fe02912e82651e1755be9fd8d81fd0a;p=dealii.git Testsuite: Also output stdout/stderr in case of a regular output file Also output everything a script piped to stdout and stderr in case a test fails to run. --- diff --git a/cmake/scripts/run_test.sh b/cmake/scripts/run_test.sh index 229d7a66a9..9a2ff609ff 100644 --- a/cmake/scripts/run_test.sh +++ b/cmake/scripts/run_test.sh @@ -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 }