From: Vsevolod Stakhov Date: Fri, 10 Jul 2015 14:26:46 +0000 (+0100) Subject: Save log files on test errors completely. X-Git-Tag: 1.0.0~393 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=48eb233fbc0d499536407ba487495fac1ff36a65;p=thirdparty%2Frspamd.git Save log files on test errors completely. --- diff --git a/test/functional/functions.sh b/test/functional/functions.sh index 50c29948b2..457ea2f2c9 100644 --- a/test/functional/functions.sh +++ b/test/functional/functions.sh @@ -4,6 +4,13 @@ save_error() { printf 'Failed in %s: %s\n' "$_where" "$_reason" > ${TMPDIR}/test.err mkdir -p /tmp/rspamd-failed-tests/${TEST_NAME} || true + # Save logs + RSPAMD_PID=`cat ${TMPDIR}/rspamd.pid` + + if [ F"${RSPAMD_PID}" != F"" ] ; then + kill -USR1 ${RSPAMD_PID} > /dev/null 2>&1 + sleep 0.5 + fi cp -rf ${TMPDIR}/* /tmp/rspamd-failed-tests/${TEST_NAME} exit 1