aboutsummaryrefslogtreecommitdiff
path: root/integrationtests/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'integrationtests/common.sh')
-rw-r--r--integrationtests/common.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/integrationtests/common.sh b/integrationtests/common.sh
index 82b3a129f..0104dbc9c 100644
--- a/integrationtests/common.sh
+++ b/integrationtests/common.sh
@@ -14,8 +14,8 @@ function setup_config() {
[[ "$(taler-merchant-httpd -v)" =~ "taler-merchant-httpd v" ]] || exit_skip " MISSING"
echo " FOUND"
- trap 'jobs -p | xargs kill &> /dev/null || true' ERR
- trap 'jobs -p | xargs kill &> /dev/null || true' EXIT
+ trap shutdown_services ERR
+ trap shutdown_services EXIT
SCRIPT_NAME=$1
@@ -135,7 +135,7 @@ function wait_for_services() {
function shutdown_services() {
echo "Shutting down services"
- jobs -p | xargs kill
+ jobs -p | xargs --no-run-if-empty kill || true
wait
# clean up
@@ -151,3 +151,8 @@ function exit_skip() {
echo "$1"
exit 77
}
+
+function exit_error() {
+ echo "Error: $1"
+ exit 1
+}