Fixing coverage reports generation
This commit is contained in:
parent
fd6d66fc86
commit
c3925a494d
@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
### Running coverage
|
### Running coverage
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
KCOV=${1:-kcov}
|
KCOV=${1:-kcov}
|
||||||
|
|
||||||
if ! type $KCOV > /dev/null; then
|
if ! type $KCOV > /dev/null; then
|
||||||
@ -19,21 +21,34 @@ if ! type $KCOV > /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
. ./scripts/targets.sh
|
. ./scripts/targets.sh
|
||||||
|
|
||||||
cargo test $TARGETS --no-run || exit $?
|
cargo test $TARGETS --no-run || exit $?
|
||||||
rm -rf target/kcov
|
|
||||||
mkdir -p target/kcov
|
|
||||||
|
|
||||||
EXCLUDE="~/.cargo,~/.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/kcov target/debug/deps/ethkey-*
|
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethstore-*
|
KCOV_TARGET="target/kcov"
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore-*
|
KCOV_FLAGS="--verify"
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethash-*
|
EXCLUDE="\
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_util-*
|
/usr/lib,\
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethsync-*
|
/usr/include,\
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_rpc-*
|
$HOME/.cargo,\
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_signer-*
|
$HOME/.multirust,\
|
||||||
$KCOV --exclude-pattern $EXCLUDE --include-pattern src target/kcov target/debug/deps/ethcore_dapps-*
|
rocksdb,\
|
||||||
$KCOV --coveralls-id=${TRAVIS_JOB_ID} --exclude-pattern $EXCLUDE target/kcov target/debug/parity-*
|
secp256k1,\
|
||||||
|
src/tests,\
|
||||||
|
util/json-tests,\
|
||||||
|
util/src/network/tests,\
|
||||||
|
ethcore/src/evm/tests,\
|
||||||
|
ethstore/tests\
|
||||||
|
"
|
||||||
|
|
||||||
|
rm -rf $KCOV_TARGET
|
||||||
|
mkdir -p $KCOV_TARGET
|
||||||
|
|
||||||
|
for FILE in `find target/debug/deps ! -name "*.*"`
|
||||||
|
do
|
||||||
|
$KCOV --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE
|
||||||
|
done
|
||||||
|
|
||||||
|
$KCOV --coveralls-id=${TRAVIS_JOB_ID} --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user