From cb2ace82db96ee86140004f33d56ea977594a022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Mon, 11 Jul 2016 19:20:48 +0200 Subject: [PATCH] Uploading to coveralls --- scripts/cov.sh | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/scripts/cov.sh b/scripts/cov.sh index 927afe5f0..01caa35c3 100755 --- a/scripts/cov.sh +++ b/scripts/cov.sh @@ -10,34 +10,29 @@ # $ cmake .. && make && sudo make install ### Running coverage -if ! type kcov > /dev/null; then + +KCOV=${1:-kcov} + +if ! type $KCOV > /dev/null; then echo "Install kcov first (details inside this file). Aborting." exit 1 fi -cargo test \ - -p ethkey \ - -p ethstore \ - -p ethash \ - -p ethcore-util \ - -p ethcore \ - -p ethsync \ - -p ethcore-rpc \ - -p parity \ - -p ethcore-signer \ - -p ethcore-dapps \ - --no-run || exit $? -rm -rf target/coverage -mkdir -p target/coverage +. ./scripts/targets.sh + +cargo test $TARGETS --no-run || exit $? +rm -rf target/kcov +mkdir -p target/kcov EXCLUDE="~/.multirust,rocksdb,secp256k1,src/tests,util/json-tests,util/src/network/tests,sync/src/tests,ethcore/src/tests,ethcore/src/evm/tests,ethstore/tests" -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethkey-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethstore-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethcore-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethash-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethcore_util-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethsync-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethcore_rpc-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethcore_signer-* -kcov --exclude-pattern $EXCLUDE --include-pattern src target/coverage target/debug/deps/ethcore_dapps-* -xdg-open target/coverage/index.html +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethkey-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethstore-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethash-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_util-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethsync-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_rpc-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_signer-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_dapps-* +$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethjson-* +$KCOV --coveralls-id=${TRAVIS_JOB_ID} --exclude-pattern $EXCLUDE target/kcov target/debug/parity-*