coverage over multiple packages (#6420)

This commit is contained in:
Rob Walker 2019-10-18 16:23:34 -07:00 committed by GitHub
parent 0fc3c7eee2
commit f2fd53e773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 8 deletions

View File

@ -12,11 +12,10 @@ source ci/_
: "${CI_COMMIT:=local}"
reportName="lcov-${CI_COMMIT:0:9}"
if [[ -n $1 ]]; then
crate="--package $1"
shift
if [[ -z $1 ]]; then
packages=( --lib --all --exclude solana-local-cluster )
else
crate="--all --exclude solana-local-cluster"
packages=( "$@" )
fi
coverageFlags=(-Zprofile) # Enable coverage
@ -37,10 +36,9 @@ fi
rm -rf target/cov/$reportName
source ci/rust-version.sh nightly
# shellcheck disable=SC2086 #
RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov --lib --no-run $crate "$@"
# shellcheck disable=SC2086 #
RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov --lib $crate "$@" 2> target/cov/coverage-stderr.log
RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov --no-run "${packages[@]}"
RUST_LOG=solana=trace _ cargo +$rust_nightly test --target-dir target/cov "${packages[@]}" 2> target/cov/coverage-stderr.log
echo "--- grcov"