From 9a9618b6041fe27962963420e9d59f196daea46c Mon Sep 17 00:00:00 2001 From: Chanhee Lee Date: Thu, 8 Feb 2024 12:39:39 -0700 Subject: [PATCH] Add a script for running unit tests --- rust/rti/run_unit_tests.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 rust/rti/run_unit_tests.sh diff --git a/rust/rti/run_unit_tests.sh b/rust/rti/run_unit_tests.sh new file mode 100755 index 0000000..3d762a7 --- /dev/null +++ b/rust/rti/run_unit_tests.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Prerequities +# 1. grcov <== cargo install grcov +# 2. llvm-tools-preview <== rustup component add llvm-tools-preview + +rm -rf cargo-test-* + +CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cargo-test-%p-%m.profraw' cargo test + +grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage