Go to file
2023-05-19 21:56:43 +02:00
src Fix clippy 2023-05-19 21:56:43 +02:00
tests Fix clippy 2023-05-19 21:56:43 +02:00
.gitignore Integrate changes with binary 2023-05-19 21:22:02 +02:00
Cargo.lock Support remote libraries (#36) 2023-04-14 16:21:25 +02:00
Cargo.toml Features are not correct (#58) 2023-05-06 11:38:51 +02:00
README.md Clean up interfaces (#62) 2023-05-10 22:52:03 +02:00

Music Hoard

Code Coverage

Pre-requisites

rustup component add llvm-tools-preview
cargo install grcov

Generating Code Coverage

env CARGO_TARGET_DIR=codecov \
    cargo clean
env RUSTFLAGS="-C instrument-coverage" \
    LLVM_PROFILE_FILE="codecov/debug/profraw/musichoard-%p-%m.profraw" \
    CARGO_TARGET_DIR=codecov \
    cargo test --all-features --all-targets
grcov codecov/debug/profraw \
      --binary-path ./codecov/debug/ \
      --output-types html \
      --source-dir . \
      --ignore-not-existing \
      --ignore "tests/*" \
      --ignore "src/main.rs" \
      --excl-start "mod tests \{|GRCOV_EXCL_START" \
      --excl-stop "GRCOV_EXCL_STOP" \
      --output-path ./codecov/debug/coverage/
xdg-open codecov/debug/coverage/index.html

Note that some changes may not be visible until codecov/debug/coverage is removed and the grcov command is rerun.

For most cases cargo clean can be replaced with rm -rf ./codecov/debug/{coverage,profraw}.