OpenTally/coverage.sh

15 lines
485 B
Bash
Raw Normal View History

2021-06-12 15:37:41 +10:00
#!/bin/bash
mkdir -p target/coverage/prof
rm target/coverage/prof/*.profraw
export RUSTC=./rustc_bs.sh
export RUSTFLAGS="-Zinstrument-coverage -Copt-level=0 -Clink-dead-code"
export LLVM_PROFILE_FILE="target/coverage/prof/opentally-%p-%m.profraw"
export CARGO_TARGET_DIR=target/coverage
cargo test
grcov target/coverage/prof --binary-path target/coverage/debug -t html -o target/coverage/html \
--ignore src/numbers/rational_num.rs \
--ignore src/stv/wasm.rs \
--ignore 'tests/*'