aboutsummaryrefslogtreecommitdiff
path: root/integrationtests/common.sh
diff options
context:
space:
mode:
authorTorsten Grote <t@grobox.de>2020-05-06 16:05:38 -0300
committerTorsten Grote <t@grobox.de>2020-05-06 16:05:38 -0300
commitb7c75bd56a484efcf77210f1541cda67e2a90f61 (patch)
tree29ef27231280b5756ed542084a60e98f418b9537 /integrationtests/common.sh
parent85af5421e53f92f24919cb57c02efb6f72fb8e27 (diff)
downloadwallet-core-b7c75bd56a484efcf77210f1541cda67e2a90f61.tar.xz
integration test for handling the same pay URI multiple times
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
+}