2023-07-29 20:36:03 +01:00
|
|
|
coverage-init:
|
|
|
|
cargo install grcov
|
|
|
|
rustup component add llvm-tools
|
|
|
|
|
2025-01-16 10:03:20 +00:00
|
|
|
test-in-docker:
|
|
|
|
docker run --rm -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest cargo test
|
|
|
|
|
|
|
|
shell-in-docker:
|
|
|
|
docker run --rm -it -v $PWD:/app/ git.kemitix.net/kemitix/rust:latest bash
|
|
|
|
|
2023-07-29 20:36:03 +01:00
|
|
|
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/
|