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