Skip to content

Commit

Permalink
add backtrace env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
rdcm committed Oct 14, 2023
1 parent 602a48a commit 1e07c94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ timestamp="$(date '+%Y-%m-%d_%H-%M-%S')"
directory_path="target/coverage/${timestamp}"

# build
export RUST_BACKTRACE=full
export LLVM_PROFILE_FILE="${directory_path}/%p-%m.profraw"
export RUSTFLAGS="-Cinstrument-coverage"
cargo build --workspace
Expand All @@ -20,7 +21,7 @@ cargo test --workspace
find . -path "*/${timestamp}/*" -name '*.profraw' -exec mv {} "./${directory_path}" \;

# generate report
grcov "target/coverage/${timestamp}" --binary-path target/debug -s . -o "${directory_path}" --ignore "target/debug/*" --ignore "integrtion-tests/*" --output-types html
grcov "${directory_path}" --binary-path target/debug -s . -o "${directory_path}" --ignore "target/debug/*" --ignore "integrtion-tests/*" --output-types html

# open report
open "./${directory_path}/html/index.html"

0 comments on commit 1e07c94

Please sign in to comment.