Skip to content

Commit

Permalink
build: Add script for reporting coverage methods
Browse files Browse the repository at this point in the history
It's named `coverage.sh` and uses `cargo-llvm-cov`[0].

[0] https://github.com/taiki-e/cargo-llvm-cov
  • Loading branch information
vadorovsky committed Jun 25, 2024
1 parent 6f31868 commit e829c6a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scripts/coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env sh

. "./scripts/devenv.sh" || { echo >&2 "Failed to source devenv.sh. Aborting."; exit 1; }

set -eux

export RUST_MIN_STACK=8388608
export RUSTFLAGS="-D warnings"

ROOT_DIR=$(git rev-parse --show-toplevel)

cargo llvm-cov \
--all-targets --workspace \
--exclude light-concurrent-merkle-tree \
--exclude photon-api \
--exclude forester \
--html
cargo llvm-cov \
--all-targets \
--package light-concurrent-merkle-tree \
--html \
--output-dir "${ROOT_DIR}/target/llvm-cov-mt"

0 comments on commit e829c6a

Please sign in to comment.