From 5f593737d534de847747a641c75f70b608ae5d74 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 8 Jul 2015 14:44:36 +0100 Subject: [PATCH] Improve functional tests teardown. --- test/functional/test_helper.bash | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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() { -- 2.47.3