We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 924b162 commit 3825ab8Copy full SHA for 3825ab8
test.sh
@@ -0,0 +1,15 @@
1
+#!/usr/bin/env bash
2
+
3
+set -e
4
5
+# https://blog.rng0.io/how-to-do-code-coverage-in-rust
6
+CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test
7
8
+rm -rf target/coverage
9
+mkdir -p target/coverage
10
11
+grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html
12
13
+grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/lcov.info
14
15
+rm *.profraw
0 commit comments