add justfile with coverage creation rules
This commit is contained in:
parent
fd24f08428
commit
e318f78250
2 changed files with 27 additions and 2 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -1,5 +1,7 @@
|
||||||
target
|
target
|
||||||
*.mp3
|
*.mp3
|
||||||
*.webm
|
*.webm
|
||||||
/subscriptions.txt
|
subscriptions.txt
|
||||||
/downloaded.txt
|
downloaded.txt
|
||||||
|
coverage
|
||||||
|
*.profraw
|
||||||
|
|
23
justfile
Normal file
23
justfile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
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/
|
Loading…
Add table
Reference in a new issue