fix just cov command

This commit is contained in:
🪞👃🪞 2025-01-27 16:08:32 +01:00
parent ad1abf6ec8
commit 5d900a303b
2 changed files with 4 additions and 8 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ vgcore*
example.mid
cov
*/cov
*.profraw

View file

@ -6,16 +6,11 @@ cloc:
for src in {cli,edn/src,input/src,jack/src,midi/src,output/src,plugin/src,sampler/src,tek/src,time/src,tui/src}; do echo; echo $src; cloc --quiet $src; done
test:
cargo test --workspace --exclude jack
covfig := "CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' RUSTDOCFLAGS='-Cinstrument-coverage' LLVM_PROFILE_FILE='cov/cargo-test-%p-%m.profraw'"
cov:
rm -rf target/coverage/html || true
export CARGO_INCREMENTAL=0
export RUSTFLAGS='-Cinstrument-coverage'
export RUSTDOCFLAGS='-Cinstrument-coverage'
export LLVM_PROFILE_FILE='cov/cargo-test-%p-%m.profraw'
time cargo test --workspace --exclude jack --profile coverage
#export LLVM_PROFILE_FILE='cov/cargo-doctest-%p-%m.profraw'
#time cargo test --workspace --exclude jack --profile coverage --doc
time grcov . --llvm --threads 2 --binary-path ./target/coverage/deps/ -s . -t html --ignore-not-existing --ignore '../*' --ignore "/*" --ignore 'target/*' -o target/coverage/html
{{covfig}} time cargo test --workspace --exclude jack --profile coverage
{{covfig}} time grcov . --binary-path ./target/coverage/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" --ignore 'target/*' -o target/coverage/html
llcov:
time cargo llvm-cov --workspace --exclude jack --profile coverage --no-report
time cargo llvm-cov --workspace --exclude jack --profile coverage --no-report --doc