From 2b7232e065df1871967fa04a148f384be84fd8d3 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 9 Dec 2020 10:21:53 +0100 Subject: [PATCH] Abort php test server on ctrl+c Signed-off-by: Vincent Petry --- tests/integration/run.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/integration/run.sh b/tests/integration/run.sh index d79af89a79d..96248c9c4e2 100755 --- a/tests/integration/run.sh +++ b/tests/integration/run.sh @@ -10,6 +10,9 @@ php -S localhost:8080 -t ${ROOT_DIR} & PHPPID=$! echo $PHPPID +# also kill php process in case of ctrl+c +trap 'kill -TERM $PHPPID; wait $PHPPID' TERM + cp -R ./spreedcheats ../../../spreedcheats ${ROOT_DIR}/occ app:enable spreed || exit 1 ${ROOT_DIR}/occ app:enable spreedcheats || exit 1 @@ -24,4 +27,6 @@ kill $PHPPID ${ROOT_DIR}/occ app:disable spreedcheats rm -rf ../../../spreedcheats +wait $PHPPID + exit $RESULT