forked from OpenZeppelin/openzeppelin-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request OpenZeppelin#369 from frangio/parallelize-travis
Make Travis run tests and coverage in parallel
- Loading branch information
Showing
4 changed files
with
36 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,3 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
# Executes cleanup function at script exit. | ||
trap cleanup EXIT | ||
|
||
cleanup() { | ||
# Kill the testrpc instance that we started (if we started one). | ||
if [ -n "$testrpc_pid" ]; then | ||
kill -9 $testrpc_pid | ||
fi | ||
} | ||
|
||
testrpc_running() { | ||
nc -z localhost 8555 | ||
} | ||
|
||
if testrpc_running; then | ||
echo "Using existing testrpc-sc instance" | ||
else | ||
echo "Starting testrpc-sc to generate coverage" | ||
# We define 10 accounts with balance 1M ether, needed for high-value tests. | ||
./node_modules/ethereumjs-testrpc-sc/build/cli.node.js --gasLimit 0xfffffffffff --port 8555 \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501201,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501202,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501203,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501204,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501205,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501206,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501207,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501208,1000000000000000000000000" \ | ||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501209,1000000000000000000000000" \ | ||
> /dev/null & | ||
testrpc_pid=$! | ||
fi | ||
|
||
SOLIDITY_COVERAGE=true ./node_modules/.bin/solidity-coverage | ||
SOLIDITY_COVERAGE=true scripts/test.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters