aboutsummaryrefslogblamecommitdiffstats
path: root/test/e2e/beta/run-drizzle.sh
blob: 0799b5a65540a4287daa66155a716e91899559f0 (plain) (tree)
1
2
3
4
5
6
7
8
9

                   



               
                                                 
                            
       




                                     
                                              


                
                                          











                                                
#!/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/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:-}