Use gdb to get backtraces
Core dumps don't work on Travis docker containers.
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user