Skip to content

Commit

Permalink
test: fix integration tests
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
nknapp authored and ErisDS committed Apr 2, 2020
1 parent b454b02 commit 645ac73
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions integration-testing/multi-nodejs-test/test.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
10 changes: 6 additions & 4 deletions integration-testing/run-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -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
done
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 645ac73

Please sign in to comment.