From: Vsevolod Stakhov Date: Mon, 20 Jul 2015 12:22:43 +0000 (+0100) Subject: Add config test stage to run_rspamd function. X-Git-Tag: 1.0.0~331 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=913234f1935e79f36047cc7a06ec0e879ee70799;p=thirdparty%2Frspamd.git Add config test stage to run_rspamd function. --- diff --git a/test/functional/functions.sh b/test/functional/functions.sh index 457ea2f2c9..84393d3259 100644 --- a/test/functional/functions.sh +++ b/test/functional/functions.sh @@ -24,7 +24,7 @@ run_rspamd() { STATS_HASH=${STATS_HASH:-"compat"} STATS_KEY=${STATS_KEY:-"osipg87ms5gzsis33fdrhaqn5wocp6qfofzxjbw8k1wh9yb6adty"} - ${RSPAMD} -c ${RSPAMD_CONFIG} -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} \ + ${RSPAMD} -c ${RSPAMD_CONFIG} -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} -t \ TMPDIR=${TMPDIR} \ STATSDIR=${STATSDIR} \ LUADIR=${LUADIR} \ @@ -33,6 +33,19 @@ run_rspamd() { TESTDIR=${TEST_DIRNAME} \ STATS_KEY=${STATS_KEY} > ${TMPDIR}/rspamd.out 2>&1 + if [ $? -ne 0 ] ; then + save_error 'rspamd' 'cannot lint rspamd configuration' + fi + + ${RSPAMD} -c ${RSPAMD_CONFIG} -u ${RSPAMD_USER} -g ${RSPAMD_GROUP} \ + TMPDIR=${TMPDIR} \ + STATSDIR=${STATSDIR} \ + LUADIR=${LUADIR} \ + STATS_BACKEND=${STATS_BACKEND} \ + STATS_HASH=${STATS_HASH} \ + TESTDIR=${TEST_DIRNAME} \ + STATS_KEY=${STATS_KEY} >> ${TMPDIR}/rspamd.out 2>&1 + if [ $? -eq 0 ] ; then export RSPAMD_PID=`cat ${TMPDIR}/rspamd.pid` else