From: Vsevolod Stakhov Date: Wed, 8 Jul 2015 13:44:36 +0000 (+0100) Subject: Improve functional tests teardown. X-Git-Tag: 1.0.0~418 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5f593737d534de847747a641c75f70b608ae5d74;p=thirdparty%2Frspamd.git Improve functional tests teardown. --- diff --git a/test/functional/test_helper.bash b/test/functional/test_helper.bash index a25035e775..239160f2ce 100644 --- a/test/functional/test_helper.bash +++ b/test/functional/test_helper.bash @@ -12,7 +12,13 @@ function run_rspamd() { function teardown() { - pkill -TERM rspamd || true + ( + pgrep rspamd > /dev/null 2>&1 + while [ $? -eq 0 ] ; do + pkill -TERM rspamd || true + pgrep rspamd > /dev/null 2>&1 + done + ) || true } function clear_stats() {