diff --git a/.gitignore b/.gitignore index 3b8f079b..7a033165 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ vgcore* example.mid cov */cov +*.profraw diff --git a/Justfile b/Justfile index 4d557045..39cde294 100644 --- a/Justfile +++ b/Justfile @@ -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