diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-01-04 20:37:33 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-01-04 22:00:08 +0800 |
commit | 4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df (patch) | |
tree | 0c641bbb552cb5e8146db0a6dcbdba5b14aaa0da | |
parent | 35fbddc5e7db5b0f00dc932192f598c1379ad08d (diff) | |
download | tangerine-wallet-browser-4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df.tar tangerine-wallet-browser-4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df.tar.gz tangerine-wallet-browser-4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df.tar.bz2 tangerine-wallet-browser-4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df.tar.lz tangerine-wallet-browser-4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df.tar.xz tangerine-wallet-browser-4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df.tar.zst tangerine-wallet-browser-4d4d4caf78dc5a3c8eaa93e2bc2e7581ac15b6df.zip |
Clean up drizzle test runner script
-rwxr-xr-x | test/e2e/beta/run-drizzle.sh | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/test/e2e/beta/run-drizzle.sh b/test/e2e/beta/run-drizzle.sh index 6d547eace..0799b5a65 100755 --- a/test/e2e/beta/run-drizzle.sh +++ b/test/e2e/beta/run-drizzle.sh @@ -4,17 +4,28 @@ set -e set -u set -o pipefail -export PATH="$PATH:./node_modules/.bin" - npm run ganache:start -- -b 2 >> /dev/null 2>&1 & +npm_run_ganache_start_pid=$! sleep 5 -cd test/e2e/beta/ -rm -rf drizzle-test -mkdir drizzle-test && cd drizzle-test -npm install truffle -../../../../node_modules/.bin/truffle unbox drizzle + +pushd "$(mktemp -d)" +npm install --no-package-lock truffle +truffle="$(npm bin)/truffle" +$truffle unbox drizzle echo "Deploying contracts for Drizzle test..." -../../../../node_modules/.bin/truffle compile && ../../../../node_modules/.bin/truffle migrate +$truffle compile +$truffle migrate + BROWSER=none npm start >> /dev/null 2>&1 & -cd ../../../../ -mocha test/e2e/beta/drizzle.spec +npm_start_pid=$! + +popd +if ! mocha test/e2e/beta/drizzle.spec +then + test_status=1 +fi + +! kill -15 $npm_run_ganache_start_pid +! kill -15 $npm_start_pid +! wait $npm_run_ganache_start_pid $npm_start_pid +exit ${test_status:-} |