Improve Travis script to show multiple core dump stacks

This commit is contained in:
Jon Siwek 2018-11-02 09:36:30 -05:00
parent 3251792ddb
commit 802b4f876e
3 changed files with 14 additions and 10 deletions

View file

@ -254,20 +254,20 @@ run() {
echo "Result code after running tests: $ret"
if [ $ret -ne 0 ]; then
COREDUMP_FIND=`find testing/btest/.tmp testing/external/*/.tmp -name core*`
COREFILE=`find testing/btest/.tmp testing/external/*/.tmp -name core* | head -n 1`
COREFILES=`find testing/btest/.tmp testing/external/*/.tmp -type f -name core*`
echo
echo "Search for core dumps ##############################################"
echo
echo `pwd`
echo
echo $COREDUMP_FIND
echo $COREFILES
if [ -f "$COREFILE" ]; then
echo "Getting stack trace from $COREFILE"
gdb build/src/bro -c "$COREFILE" -ex "thread apply all bt" -ex "set pagination 0" -batch;
fi
for cf in $COREFILES; do
echo
echo "############# Begin stack trace for $cf ###############"
gdb build/src/bro -c "$cf" -ex "thread apply all bt" -ex "set pagination 0" -batch;
echo "############# End stack trace for $cf #################"
echo
done
fi
# If we get here, then external tests were successful.