From 4870bccabaf952ae076850e550ca232526695510 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 29 Apr 2015 09:03:17 -0400 Subject: Use gdb to get backtraces Core dumps don't work on Travis docker containers. --- scripts/run_tests.sh | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'scripts/run_tests.sh') diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index e4c9e77eac..b8691caa44 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -24,21 +24,5 @@ if [ ! -d "test/node_modules/express" ]; then (cd test; npm install express@4.11.1) fi -RESULT=0 -${CMD} "$@" || RESULT=$? - -if [[ ${RESULT} != 0 ]]; then - echo "The program crashed with exit code ${RESULT}. We're now trying to output the core dump." -fi - -# output core dump if we got one -for DUMP in $(find ./ -maxdepth 1 -name 'core*' -print); do - gdb ${CMD} ${DUMP} -ex "thread apply all bt" -ex "set pagination 0" -batch - rm -rf ${DUMP} -done - -# now we should present travis with the original -# error code so the run cleanly stops -if [[ ${RESULT} != 0 ]]; then - exit $RESULT -fi +gdb -batch -return-child-result -ex 'set print thread-events off' \ + -ex 'run' -ex 'thread apply all bt' ${CMD} -- cgit v1.2.1