diff --git a/.gitlab-ci/gdb-wrapper.gdb b/.gitlab-ci/gdb-wrapper.gdb new file mode 100644 index 0000000000..d9795d0b67 --- /dev/null +++ b/.gitlab-ci/gdb-wrapper.gdb @@ -0,0 +1,28 @@ +set charset UTF-8 +set logging redirect on +set logging debugredirect on +set logging enabled on +set schedule-multiple on +set detach-on-fork off + +catch signal +commands + set logging enabled off + py print ("# " + gdb.execute ("thread apply all bt full", True, True).replace ("\n", "\n# ")) + set logging enabled on + c +end + +catch signal SIGTRAP +commands + set logging enabled off + py print ("# " + gdb.execute ("thread apply all bt full", True, True).replace ("\n", "\n# ")) + set logging enabled on + q 1 +end + +r +if $_isvoid($_exitcode) + q $_exitsignal +else + q $_exitcode diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh index 1a202859a9..bb96f50e05 100755 --- a/.gitlab-ci/run-tests.sh +++ b/.gitlab-ci/run-tests.sh @@ -94,6 +94,7 @@ case "${setup}" in --timeout-multiplier "${multiplier}" \ --num-processes "${n_processes}" \ --maxfail "${max_fail}" \ + --wrapper "gdb -batch -x ..\.gitlab-ci\gdb-wrapper.gdb --args" \ --print-errorlogs \ --setup=${setup} \ --suite=${suite//,/ --suite=} \ diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index 2ef4605fc3..776f5d256f 100644 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -17,6 +17,7 @@ pacman --noconfirm -S --needed \ ${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme \ ${MINGW_PACKAGE_PREFIX}-atk \ ${MINGW_PACKAGE_PREFIX}-cairo \ + ${MINGW_PACKAGE_PREFIX}-gdb \ ${MINGW_PACKAGE_PREFIX}-gdk-pixbuf2 \ ${MINGW_PACKAGE_PREFIX}-glib2 \ ${MINGW_PACKAGE_PREFIX}-graphene \