You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
731 B

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