From 645ac73844918668f9a2f41e49b7cb18ce5abf36 Mon Sep 17 00:00:00 2001 From: Nils Knappmeier Date: Thu, 2 Apr 2020 08:39:51 +0200 Subject: [PATCH] test: fix integration tests - They should fail, if any test fails - Use "set -e" instead of "|| exit 1", because it suffices to be specified at the top of each file --- integration-testing/multi-nodejs-test/test.sh | 6 ++++-- integration-testing/run-integration-tests.sh | 10 ++++++---- package-lock.json | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/integration-testing/multi-nodejs-test/test.sh b/integration-testing/multi-nodejs-test/test.sh index db2caf854..99682b453 100755 --- a/integration-testing/multi-nodejs-test/test.sh +++ b/integration-testing/multi-nodejs-test/test.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + cd "$( dirname "$( readlink -f "$0" )" )" || exit 1 # shellcheck disable=SC1090 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" @@ -20,8 +22,8 @@ for i in 0.10 0.12 4 5 6 7 8 9 10 11 ; do mkdir target nvm install "$i" nvm exec "$i" npm install - nvm exec "$i" npm run test || exit 1 - nvm exec "$i" npm run test-precompile || exit 1 + nvm exec "$i" npm run test + nvm exec "$i" npm run test-precompile echo Success done diff --git a/integration-testing/run-integration-tests.sh b/integration-testing/run-integration-tests.sh index dd6e72764..56e9c3ad1 100755 --- a/integration-testing/run-integration-tests.sh +++ b/integration-testing/run-integration-tests.sh @@ -1,13 +1,15 @@ #!/bin/bash -cd "$( dirname "$( readlink -f "$0" )" )" || exit 1 +set -e + +cd "$( dirname "$( readlink -f "$0" )" )" for i in */test.sh ; do ( echo "----------------------------------------" echo "-- Running integration test: $i" echo "----------------------------------------" - cd "$( dirname "$i" )" || exit 1 - ./test.sh || exit 1 + cd "$( dirname "$i" )" + ./test.sh ) -done \ No newline at end of file +done diff --git a/package-lock.json b/package-lock.json index 6b1f041a6..24aa5a508 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "handlebars", - "version": "4.7.3", + "version": "4.7.4", "lockfileVersion": 1, "requires": true, "dependencies": {