aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFilip Š <filip.stamcar@hotmail.com>2019-01-10 21:27:21 +0800
committerFilip Š <filip.stamcar@hotmail.com>2019-01-10 21:27:21 +0800
commit7ff8d6c6b160ce2a032b53e5cf6ea5b3e4a83554 (patch)
tree2c3b47607f45e214652bd9082052c02e0e3510b2 /test
parentdc2d16ca47841a7e69304bde7b7c2f932eb3d990 (diff)
parentcef4caeb61f2564e1ed871c12449f1e5c8d66427 (diff)
downloadtangerine-wallet-browser-7ff8d6c6b160ce2a032b53e5cf6ea5b3e4a83554.tar.gz
tangerine-wallet-browser-7ff8d6c6b160ce2a032b53e5cf6ea5b3e4a83554.tar.zst
tangerine-wallet-browser-7ff8d6c6b160ce2a032b53e5cf6ea5b3e4a83554.zip
Merge branch 'develop' of https://github.com/MetaMask/metamask-extension into patch-1
Diffstat (limited to 'test')
-rwxr-xr-xtest/e2e/beta/run-drizzle.sh33
1 files changed, 24 insertions, 9 deletions
diff --git a/test/e2e/beta/run-drizzle.sh b/test/e2e/beta/run-drizzle.sh
index 609f2765e..0799b5a65 100755
--- a/test/e2e/beta/run-drizzle.sh
+++ b/test/e2e/beta/run-drizzle.sh
@@ -1,16 +1,31 @@
#!/usr/bin/env bash
-export PATH="$PATH:./node_modules/.bin"
+set -e
+set -u
+set -o pipefail
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
-sudo npm install -g truffle
-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..."
-truffle compile && 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:-}