diff options
Diffstat (limited to 'test/e2e/run-drizzle.sh')
-rwxr-xr-x | test/e2e/run-drizzle.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/e2e/run-drizzle.sh b/test/e2e/run-drizzle.sh new file mode 100755 index 000000000..f3db2638a --- /dev/null +++ b/test/e2e/run-drizzle.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -e +set -u +set -o pipefail + +npm run ganache:start -- -b 2 >> /dev/null 2>&1 & +npm_run_ganache_start_pid=$! +sleep 5 + +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 + +BROWSER=none npm start >> /dev/null 2>&1 & +npm_start_pid=$! + +popd +if ! mocha test/e2e/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:-} |