diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-20 13:22:43 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-07-20 13:22:43 +0100 |
commit | 913234f1935e79f36047cc7a06ec0e879ee70799 (patch) | |
tree | 8895b15cbf8b98502846bb54aa7c0354416ee6f6 /test | |
parent | fcbb632de425168941dc33b6d5280f81c7f3ad29 (diff) | |
download | rspamd-913234f1935e79f36047cc7a06ec0e879ee70799.tar.gz rspamd-913234f1935e79f36047cc7a06ec0e879ee70799.zip |
Add config test stage to run_rspamd function.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/functions.sh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/functional/functions.sh b/test/functional/functions.sh index 457ea2f2c..84393d325 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 |