From 4c9b986121facf6f71b30917f60fbfc9d3171e77 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Mar 2021 15:39:26 +0100 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70842fa0a3..1c07071fa1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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