Skip to content

Commit

Permalink
Add (suboptimal) coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
torkleyy committed Oct 16, 2021
1 parent ff32974 commit 4278dc8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name = "ron-reboot"
version = "0.1.0"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde = { version = "1.0.130", optional = true }

Expand Down
13 changes: 13 additions & 0 deletions scripts/collect-cov.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e

if ! cargo install --list | grep -q "grcov"; then
echo "Installing grcvo because it was not found..."
cargo install grcov
fi

cargo clean
CARGO_INCREMENTAL=0 RUSTFLAGS="-Zprofile" cargo +nightly build --all-features
CARGO_INCREMENTAL=0 RUSTFLAGS="-Zprofile" cargo +nightly test --all-features
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/

0 comments on commit 4278dc8

Please sign in to comment.