Merge pull request #320 from cgewecke/coverage-badge
Minor coverage maintenance
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@ build/
|
|||||||
.DS_Store/
|
.DS_Store/
|
||||||
/coverage
|
/coverage
|
||||||
coverage.json
|
coverage.json
|
||||||
|
allFiredEvents
|
||||||
|
scTopics
|
||||||
@ -1,7 +1,7 @@
|
|||||||
# Zeppelin Solidity
|
# Zeppelin Solidity
|
||||||
[](https://www.npmjs.org/package/zeppelin-solidity)
|
[](https://www.npmjs.org/package/zeppelin-solidity)
|
||||||
[](https://travis-ci.org/OpenZeppelin/zeppelin-solidity)
|
[](https://travis-ci.org/OpenZeppelin/zeppelin-solidity)
|
||||||
[](https://coveralls.io/github/OpenZeppelin/zeppelin-solidity?branch=coveralls)
|
[](https://coveralls.io/github/OpenZeppelin/zeppelin-solidity?branch=master)
|
||||||
|
|
||||||
OpenZeppelin is a library for writing secure [Smart Contracts](https://en.wikipedia.org/wiki/Smart_contract) on Ethereum.
|
OpenZeppelin is a library for writing secure [Smart Contracts](https://en.wikipedia.org/wiki/Smart_contract) on Ethereum.
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,24 @@
|
|||||||
#! /bin/bash
|
#!/bin/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
|
||||||
|
}
|
||||||
|
|
||||||
output=$(nc -z localhost 8555; echo $?)
|
testrpc_running() {
|
||||||
[ $output -eq "0" ] && trpc_running=true
|
nc -z localhost 8555
|
||||||
if [ ! $trpc_running ]; then
|
}
|
||||||
|
|
||||||
|
if testrpc_running; then
|
||||||
|
echo "Using existing testrpc-sc instance"
|
||||||
|
else
|
||||||
echo "Starting testrpc-sc to generate coverage"
|
echo "Starting testrpc-sc to generate coverage"
|
||||||
# we give each account 1M ether, needed for high-value tests
|
# We define 10 accounts with balance 1M ether, needed for high-value tests.
|
||||||
./node_modules/ethereumjs-testrpc-sc/bin/testrpc --gasLimit 0xfffffffffff --port 8555 \
|
./node_modules/ethereumjs-testrpc-sc/bin/testrpc --gasLimit 0xfffffffffff --port 8555 \
|
||||||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200,1000000000000000000000000" \
|
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501200,1000000000000000000000000" \
|
||||||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501201,1000000000000000000000000" \
|
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501201,1000000000000000000000000" \
|
||||||
@ -19,7 +31,7 @@ if [ ! $trpc_running ]; then
|
|||||||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501208,1000000000000000000000000" \
|
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501208,1000000000000000000000000" \
|
||||||
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501209,1000000000000000000000000" \
|
--account="0x2bdd21761a483f71054e14f5b827213567971c676928d9a1808cbfa4b7501209,1000000000000000000000000" \
|
||||||
> /dev/null &
|
> /dev/null &
|
||||||
trpc_pid=$!
|
testrpc_pid=$!
|
||||||
fi
|
fi
|
||||||
SOLIDITY_COVERAGE=true && ./node_modules/.bin/solidity-coverage
|
|
||||||
|
|
||||||
|
SOLIDITY_COVERAGE=true ./node_modules/.bin/solidity-coverage
|
||||||
|
|||||||
Reference in New Issue
Block a user