From 0d2a97c67e361c41434f1cf855f4bd26a891340b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 8 Feb 2015 11:11:00 +0100 Subject: run-tests.sh: use trap to clean up Signed-off-by: Florian Pritz --- run-tests.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index e54d08b4b..38f21f3c3 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -26,6 +26,14 @@ test -d application || exit 1 test -f run-tests.sh || exit 1 # prepare +trap cleanup EXIT INT +cleanup() { + if ((use_php_dev_server)); then + kill $server_pid + fi + rm -f $startdir/application/config/database-testsuite.php +} + cat <application/config/database-testsuite.php || exit 1