From 3dbea1a7a185de0c6d1a725898f91da6fee4648e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Fri, 31 Aug 2018 00:21:57 +0100 Subject: [PATCH] ci: only include local paths in coverage script (except target) (#9437) --- scripts/gitlab/coverage.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/gitlab/coverage.sh b/scripts/gitlab/coverage.sh index 1ddf340a1..38d01cb1f 100755 --- a/scripts/gitlab/coverage.sh +++ b/scripts/gitlab/coverage.sh @@ -6,15 +6,15 @@ rm -rf target/* cargo test --all --exclude evmjit --no-run -- --test-threads 8|| exit $? KCOV_TARGET="target/cov" KCOV_FLAGS="--verify" -EXCLUDE="/usr/lib,/usr/include,$HOME/.cargo,$HOME/.multirust,rocksdb,secp256k1" mkdir -p $KCOV_TARGET echo "__________Cover RUST___________" -for FILE in `find target/debug/deps ! -name "*.*"` - do - timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET $FILE - done -timeout --signal=SIGKILL 5m kcov --exclude-pattern $EXCLUDE $KCOV_FLAGS $KCOV_TARGET target/debug/parity-* -echo "Cover JS" -bash <(curl -s https://codecov.io/bash)&& -echo "Uploaded code coverage" +for FILE in `find target/debug/deps ! -name "*.*" -type f` +do + timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET $FILE +done +timeout --signal=SIGKILL 5m kcov --include-path=$(pwd) --exclude-path=$(pwd)/target $KCOV_FLAGS $KCOV_TARGET target/debug/parity-* + +bash <(curl -s https://codecov.io/bash) && + echo "Uploaded code coverage" + exit 0