ci: only include local paths in coverage script (except target) (#9437)

This commit is contained in:
André Silva 2018-08-31 00:21:57 +01:00 committed by Afri Schoedon
parent 644d1db5ef
commit 3dbea1a7a1

View File

@ -6,15 +6,15 @@ rm -rf target/*
cargo test --all --exclude evmjit --no-run -- --test-threads 8|| exit $? cargo test --all --exclude evmjit --no-run -- --test-threads 8|| exit $?
KCOV_TARGET="target/cov" KCOV_TARGET="target/cov"
KCOV_FLAGS="--verify" KCOV_FLAGS="--verify"
EXCLUDE="/usr/lib,/usr/include,$HOME/.cargo,$HOME/.multirust,rocksdb,secp256k1"
mkdir -p $KCOV_TARGET mkdir -p $KCOV_TARGET
echo "__________Cover RUST___________" echo "__________Cover RUST___________"
for FILE in `find target/debug/deps ! -name "*.*"` for FILE in `find target/debug/deps ! -name "*.*" -type f`
do do
timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET $FILE
done done
timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET target/debug/parity-* timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET target/debug/parity-*
echo "Cover JS"
bash <(curl -s https://codecov.io/bash) && bash <(curl -s https://codecov.io/bash) &&
echo "Uploaded code coverage" echo "Uploaded code coverage"
exit 0 exit 0