Skip to content

Commit

Permalink
build: Add script for reporting coverage methods (#868)
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 authored Jun 25, 2024
1 parent b9c20f3 commit 089c51c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/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 \
--output-dir "${ROOT_DIR}/target/llvm-cov" \
--open
cargo llvm-cov \
--all-targets \
--package light-concurrent-merkle-tree \
--html \
--output-dir "${ROOT_DIR}/target/llvm-cov-cmt" \
--open

0 comments on commit 089c51c

Please sign in to comment.