Files
rust/Makefile
2024-05-03 12:25:20 +03:00

16 lines
746 B
Makefile

prepare-mac: prepare
brew install llvm
prepare:
rustup component add llvm-tools-preview
test:
cargo clean
mkdir -p coverage/
mkdir -p target/coverage
rm -rf coverage/*
rm -rf target/coverage/*
RUSTFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='coverage/cargo-test-%p-%m.profraw' cargo test --workspace
grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" --ignore "*.test.rs" --excl-line '^[ \t]*///.$$' -o target/coverage/lcov.info
grcov . --binary-path ./target/debug/deps/ -s . -t markdown --branch --ignore-not-existing --ignore '../*' --ignore "/*" --ignore "*.test.rs" --excl-line '^[ \t]*///.$$' -o target/coverage/statistic.md
cat target/coverage/statistic.md