Skip to content

Commit

Permalink
coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
nbittich committed Nov 30, 2024
1 parent 226f700 commit 0cfee8b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/target
/Cargo.lock
*.profraw

15 changes: 15 additions & 0 deletions coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

# Doc for grcov
# https://github.com/mozilla/grcov
#

set -xe
rm -f *.profraw
cargo clean
export RUSTFLAGS="-Cinstrument-coverage"
cargo build
export LLVM_PROFILE_FILE="tortank-%p-%m.profraw"
cargo test
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
xdg-open "target/debug/coverage/index.html"

0 comments on commit 0cfee8b

Please sign in to comment.