From df417bd38a56c0e8812345b8f4393b25b1571896 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Mon, 29 May 2017 23:01:17 +0200 Subject: [PATCH] Upload files for debugging if linuxdeployqt segfaults --- tests/tests-ci.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/tests/tests-ci.sh b/tests/tests-ci.sh index 9bd5fa3..cf30e52 100755 --- a/tests/tests-ci.sh +++ b/tests/tests-ci.sh @@ -3,8 +3,8 @@ set -x source /opt/qt*/bin/qt*-env.sh -/opt/qt*/bin/qmake linuxdeployqt.pro -make -j2 +/opt/qt*/bin/qmake CONFIG+=debug linuxdeployqt.pro +make -j mkdir -p linuxdeployqt.AppDir/usr/bin/ cp /usr/local/bin/{appimagetool,mksquashfs,patchelf,zsyncmake} linuxdeployqt.AppDir/usr/bin/ @@ -24,4 +24,19 @@ do sleep 1; done -bash -e tests/tests.sh +# enable core dumps +echo "/tmp/coredump" | sudo tee /proc/sys/kernel/core_pattern + +ulimit -c unlimited +ulimit -a -S +ulimit -a -H + +bash -e tests/tests.sh || RESULT=$? + +if [ $RESULT -ne 0 ]; then + echo "FAILURE: linuxdeployqt CRASHED -- uploading files for debugging to transfer.sh" + set -v + [ -e /tmp/coredump ] && curl --upload-file /tmp/coredump https://transfer.sh/coredump + curl --upload-file linuxdeployqt-*-x86_64.AppImage https://transfer.sh/linuxdeployqt-x86_64.AppImage + exit $RESULT +fi