-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Improve test coverage #1255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve test coverage #1255
Conversation
The hash never needs to be good but before it was simply doing nothing for these.
This is amazing work! Will review tomorrow. |
We could let kcov only be run on master, fwiw. We don't care about travis cycle times on master (do we?) |
Don't think so. |
We could also use coveralls? |
If we integrate it in travis, yes. |
@@ -0,0 +1,2 @@ | |||
fn this_is_obviously(not: a, toml: file) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we place this in tests/aux
?
@@ -0,0 +1 @@ | |||
blacklisted-names = 42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto regarding aux
--verify \ | ||
--include-path="$(pwd)/src","$(pwd)/clippy_lints/src" \ | ||
"$tmpdir/$t" \ | ||
cargo test --test "$t" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if there's a better way of doing this. perhaps we could turn off the compiletest tests with an env var, and then just run cargo test
?
r=me when ready |
Actually, looks ready now 😄 |
This adds a script
util/cov.sh
to runkcov
on clippy.I did not configure travis to use because it takes some time (~15min on my machine), and uses a lot of memory. Also some results are weird:
kcov
does not seem to like rust'smatch
very much;kcov
definitely does not like ourit_let_chain!
macro (it only considers the first line, and we have a lot of those);Anyway, it did show some stuffs that we were not testing but could easily do: reported coverage goes up from 90.9% to 91.4% 🎉 🎈
For fun,^w^w here are the reports before and after.