From 26e6ec20da4e85849d0688db5fd580056ebdfed9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Thu, 23 Oct 2014 05:34:16 -0700 Subject: [PATCH] show that the program crashed --- scripts/run_tests.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index e9952e46b..df0bf2521 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -3,15 +3,21 @@ set -e set -o pipefail -# allow writing core files -ulimit -c unlimited -S cd build/${BUILDTYPE:-Release} for TEST in ./test_* ; do + # allow writing core files + ulimit -c unlimited -S + RESULT=0 ${TEST} || RESULT=$? + if [[ ${RESULT} != 0 ]]; then + echo "The program crashed with exit code ${RESULT}. We're now trying to output the core dump." + ls -la + fi + # output core dump if we got one for DUMP in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb ${TEST} ${DUMP} -ex "thread apply all bt" -ex "set pagination 0" -batch