mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-22 20:53:21 +00:00
Improve the coverage script
This commit is contained in:
parent
12c2d6a8d0
commit
2cd58e40f0
1 changed files with 7 additions and 17 deletions
24
util/cov.sh
24
util/cov.sh
|
@ -5,25 +5,15 @@
|
|||
# `compile-test` is special. `kcov` does not work directly on it so these files
|
||||
# are compiled manually.
|
||||
|
||||
tests=(
|
||||
camel_case
|
||||
cc_seme
|
||||
consts
|
||||
dogfood
|
||||
issue_825
|
||||
matches
|
||||
trim_multiline
|
||||
used_underscore_binding_macro
|
||||
versioncheck
|
||||
)
|
||||
tests=$(find tests/ -maxdepth 1 -name '*.rs' ! -name compile-test.rs -exec basename {} .rs \;)
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
cargo test --no-run --verbose
|
||||
|
||||
for t in "${tests[@]}"; do
|
||||
for t in $tests; do
|
||||
kcov \
|
||||
--verify \
|
||||
--include-path="$(pwd)/src","$(pwd)/clippy_lints/src" \
|
||||
--include-path="$(pwd)/src,$(pwd)/clippy_lints/src" \
|
||||
"$tmpdir/$t" \
|
||||
cargo test --test "$t"
|
||||
done
|
||||
|
@ -31,16 +21,16 @@ done
|
|||
for t in ./tests/compile-fail/*.rs; do
|
||||
kcov \
|
||||
--verify \
|
||||
--include-path="$(pwd)/src","$(pwd)/clippy_lints/src" \
|
||||
"$tmpdir/compile-fail-$(basename $t)" \
|
||||
--include-path="$(pwd)/src,$(pwd)/clippy_lints/src" \
|
||||
"$tmpdir/compile-fail-$(basename "$t")" \
|
||||
cargo run -- -L target/debug -L target/debug/deps -Z no-trans "$t"
|
||||
done
|
||||
|
||||
for t in ./tests/run-pass/*.rs; do
|
||||
kcov \
|
||||
--verify \
|
||||
--include-path="$(pwd)/src","$(pwd)/clippy_lints/src" \
|
||||
"$tmpdir/run-pass-$(basename $t)" \
|
||||
--include-path="$(pwd)/src,$(pwd)/clippy_lints/src" \
|
||||
"$tmpdir/run-pass-$(basename "$t")" \
|
||||
cargo run -- -L target/debug -L target/debug/deps -Z no-trans "$t"
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in a new issue