Go to file
2023-04-12 22:09:56 +02:00
src Unit test collection module 2023-04-12 22:09:56 +02:00
tests Unit test collection module 2023-04-12 22:09:56 +02:00
.gitignore Unit test collection module 2023-04-12 22:09:56 +02:00
Cargo.lock Initial TUI implementation (untested) 2023-04-12 20:58:02 +02:00
Cargo.toml Initial TUI implementation (untested) 2023-04-12 20:58:02 +02:00
README.md Unit test collection module 2023-04-12 22:09:56 +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
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 \{" \
      --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.