summaryrefslogtreecommitdiff
path: root/server/coverage.sh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2025-02-03 23:58:47 +0100
committerJoel Klinghed <the_jk@spawned.biz>2025-02-03 23:58:47 +0100
commitf1663e24c148421692346f7470d77b258d78b585 (patch)
tree2a44cdb4da386fcca6b6be9037dcd9ce0ac88471 /server/coverage.sh
parent67331b851295b0067f74cd410aef7986aa6a848e (diff)
code coverage: Add tests for common
Add coverage for common as well as server. Fix fs_utils::create_dir_allow_existing to fail if entry exists but isn't a dir.
Diffstat (limited to 'server/coverage.sh')
-rwxr-xr-xserver/coverage.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/coverage.sh b/server/coverage.sh
index fb2ad88..2298516 100755
--- a/server/coverage.sh
+++ b/server/coverage.sh
@@ -5,9 +5,9 @@ set +e
# Remove old instrumented data
rm -rf ./target/debug/coverage/
-
-
# Run tests, with instrument-coverage enabled
-RUSTFLAGS="-Cinstrument-coverage" LLVM_PROFILE_FILE="target/debug/coverage/%p-%m.profraw" cargo test
+RUSTFLAGS="-C instrument-coverage" LLVM_PROFILE_FILE="target/debug/coverage/%p-%m.profraw" cargo test
+
+~/.cargo/bin/grcov ./target/debug/coverage/ ./common/target/debug/coverage/ -s . --binary-path ./target/debug/ -t html --keep-only 'src/*' --keep-only 'common/src/*' -o ./target/debug/coverage/
-~/.cargo/bin/grcov ./target/debug/coverage/ -s . --binary-path ./target/debug/ -t html --keep-only 'src/*' -o ./target/debug/coverage/
+echo "Coverage report found in: ./target/debug/coverage/html/"