summaryrefslogtreecommitdiff
path: root/server/coverage.sh
blob: 22985167ac7b90ed895642b93874e70c9d957224 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

set +e

# Remove old instrumented data
rm -rf ./target/debug/coverage/

# Run tests, with instrument-coverage enabled
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/

echo "Coverage report found in: ./target/debug/coverage/html/"