diff --git a/.travis.yml b/.travis.yml index d7e57422cb..283530fefa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/continuous_integration/debug.gdb b/continuous_integration/debug.gdb new file mode 100644 index 0000000000..38b562123e --- /dev/null +++ b/continuous_integration/debug.gdb @@ -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