Paul Campbell
83081a2051
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Reviewed-on: #9 Co-authored-by: Paul Campbell <pcampbell@kemitix.net> Co-committed-by: Paul Campbell <pcampbell@kemitix.net>
23 lines
527 B
Makefile
23 lines
527 B
Makefile
coverage-init:
|
|
cargo install grcov
|
|
rustup component add llvm-tools
|
|
|
|
coverage:
|
|
#!/usr/bin/env bash
|
|
set -e
|
|
rm -rf ./target
|
|
just clean
|
|
export RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="just-%p-%m.profraw"
|
|
cargo +nightly build
|
|
cargo +nightly test
|
|
just generate
|
|
just server
|
|
|
|
generate:
|
|
grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "./target/" -o ./coverage/
|
|
|
|
server:
|
|
cd ./coverage && python3 -m http.server 8001
|
|
|
|
clean:
|
|
rm -rf ./*.prof* ./coverage/
|