Skip to content

Commit

Permalink
Workaround a bug in cargo-kcov
Browse files Browse the repository at this point in the history
cargo-kcov doesn't work with features and workspaces.
kennytm/cargo-kcov#39
  • Loading branch information
asomers committed Jan 1, 2019
1 parent 13fd58a commit be7ac79
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ cargo +stable test --all
# rustfmt screws them up.
cargo +nightly fmt --package bfffs-fio -- --check

# Measure test coverage, too
which -s kcov && \
env CARGO_TARGET_DIR=/localhome/somers/src/rust/bfffs/target_cov cargo +nightly kcov --all -v --features mocks -- --include-path="bfffs/src,isa-l/src"
# Measure test coverage, too. Only measure test coverage for the main crate,
# because cargo-kcov doesn't work with workspaces that have features.
# https://github.com/kennytm/cargo-kcov/issues/39
if which -s kcov ; then
cd bfffs;
env CARGO_TARGET_DIR=/localhome/somers/src/rust/bfffs/target_cov cargo +nightly kcov --all -v --features mocks -- --include-path="src"
fi

0 comments on commit be7ac79

Please sign in to comment.