#!/bin/sh # script/coverage: Run test suite for application and apply code coverage, finish with opening browser in html to see report. CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test mkdir -p target/coverage/html grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html rm cargo-test* open target/coverage/html/index.html