diff --git a/.gitignore b/.gitignore index 9386f3b..22f1ca8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ /target /Cargo.lock **/*.rs.bk +/prof +*.profraw diff --git a/README.md b/README.md new file mode 100644 index 0000000..f40e269 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# RADN + +## Coverage + +```sh +rustup component add llvm-tools +cargo install grcov +``` + +```sh +export RUSTFLAGS="-Cinstrument-coverage" +export LLVM_PROFILE_FILE="prof/%p-%m.profraw" +``` + +```sh +./coverage.sh +``` diff --git a/coverage.sh b/coverage.sh new file mode 100755 index 0000000..79fca17 --- /dev/null +++ b/coverage.sh @@ -0,0 +1,6 @@ +export RUSTFLAGS="-Cinstrument-coverage" +export LLVM_PROFILE_FILE="prof/%p-%m.profraw" +cargo test +cargo run --example trace +cargo run --example trees +grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/