Try getting backtrace from gdb if the test crashes

Run gdb on the core file, if one was generated.

Also remove any limits on core file size to try to ensure that it is
generated in the first place.
This commit is contained in:
Vadim Zeitlin 2021-03-23 15:39:26 +01:00
parent 0d962fbe66
commit 4c9b986121

View File

@ -232,7 +232,15 @@ jobs:
fi
export ASAN_OPTIONS="$ASAN_OPTIONS fast_unwind_on_malloc=0"
fi
xvfb-run -a -s '-screen 0 1600x1200x24' ./test_gui
ulimit -c unlimited
/bin/bash -o pipefail -c 'xvfb-run -a -s "-screen 0 1600x1200x24" ./test_gui 2>&1 | tee test_gui.out' || rc=$?
if [ -n "$rc" ]; then
if fgrep -q '(core dumped)' test_gui.out; then
echo '*** Test crashed, trying to get more information ***'
gdb --quiet --core=core -ex 'where' -ex 'thread apply all bt' -ex 'q' ./test_gui
fi
exit $rc
fi
- name: Building samples
if: matrix.skip_testing != true && matrix.skip_gui != true && matrix.skip_samples != true