hyperplonk/scripts/test_coverage.sh
scripts/test_coverage.shRaw
1#!/usr/bin/env nix-shell
2#!nix-shell ../nix/nightly.nix -i bash
3
4#Fail out on error
5set -e
6
7set -o xtrace
8IGNORED_FILES="--ignore **/errors.rs\
9 --ignore **/src/bin/*\
10 --ignore transactions/src/parameters.rs\
11 --ignore transactions/src/bench_utils/*\
12 "
13export CARGO_INCREMENTAL=0
14export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=3 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests"
15export RUSTDOCFLAGS=""
16rm -vf ./target/**/*.gcda
17cargo build
18cargo test --lib
19grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing $IGNORED_FILES -o ./target/debug/coverage/
20echo "Coverage report available at target/debug/coverage/index.html."