chore: add grcov-coverage as an alternate report generation recipe
This commit is contained in:
parent
e29c274aaf
commit
d67b821130
1 changed files with 14 additions and 0 deletions
14
justfile
14
justfile
|
@ -21,3 +21,17 @@ start-ngrok:
|
|||
coverage-update:
|
||||
cargo tarpaulin --lib --out html
|
||||
echo "Now:\n\topen tarpaulin-report.html"
|
||||
|
||||
grcov-coverage:
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
# an alternate coverage report
|
||||
rustup component add llvm-tools-preview
|
||||
export RUSTFLAGS="-Cinstrument-coverage"
|
||||
cargo build
|
||||
export LLVM_PROFILE_FILE="git-next-%p-%m.profraw"
|
||||
cargo test
|
||||
echo "Building report..."
|
||||
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
|
||||
find . -name '*.profraw' -exec rm "{}" \;
|
||||
echo "Now:\n\topen target/debug/coverage/index.html"
|
||||
|
|
Loading…
Reference in a new issue