]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Run gdb if rspamd-test dumped core
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 16 Oct 2018 16:19:25 +0000 (12:19 -0400)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Tue, 16 Oct 2018 16:22:32 +0000 (12:22 -0400)
.drone.yml

index 78f585fab0148939fd948e4161d037f6b41e07e3..c1a839b9575579a5d0e3402c9915428f24e4e4fe 100644 (file)
@@ -48,6 +48,12 @@ pipeline:
       - set +e
       - ./rspamd-test -p /rspamd/lua; EXIT_CODE=$?
       - set -e
+      # shell sets exit status of a process that terminated by a signal to '128 + signal-number'
+      - >
+        if [ $EXIT_CODE -gt 128 ];
+        then gdb -c /var/tmp/*.rspamd-test.core ./rspamd-test -ex "set pagination 0" -ex "thread apply all bt full" --batch;
+        exit $EXIT_CODE;
+        fi
       # luacov-coveralls reads luacov.stats.out written by rspamd-test using luacov module
       # and writes json report for coveralls.io service
       - luacov-coveralls -o /rspamd/build/unit_test_lua.json --dryrun