Skip to content

Commit

Permalink
better CI logs w/ gdb after core dump
Browse files Browse the repository at this point in the history
  • Loading branch information
gojomo committed Jan 27, 2020
1 parent b8346c1 commit f5e05d0
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,17 @@ matrix:

install:
- pip install tox
- sudo apt-get install -y gdb # install gdb


before_script:
- ulimit -c unlimited -S # enable core dumps


script: tox -vv


after_failure:
- pwd
- COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) # find core file
- if [[ -f "$COREFILE" ]]; then EXECFILE=$(gdb -c "$COREFILE" -batch | grep "Core was generated" | tr -d "\`" | cut -d' ' -f5); file "$COREFILE"; gdb -c "$COREFILE" "$EXECFILE" -x continuous_integration/debug.gdb -batch; fi
21 changes: 21 additions & 0 deletions continuous_integration/debug.gdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# commands to run on CI machine in event of testing core-dump

set trace-commands on

thread apply all bt

f
info args
info locals

up

f
info args
info locals

up

f
info args
info locals

0 comments on commit f5e05d0

Please sign in to comment.