-
Notifications
You must be signed in to change notification settings - Fork 931
Fix and tweak integration tests #2715
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
Conversation
Ping @gnzlbg - I've been trying to get more of the integration tests passing, but I can't get any useful info to debug. I've tried a few of these crates locally and they pass rustfmt-ing. Do you have any idea why the integeration tests are failing and why I don't see the output from rustfmt? |
check_fmt | ||
if [[ $? != 0 ]]; then | ||
return 1 | ||
fi |
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.
Note that stdsimd
was broken because the doc tests failed to build after a reformat. IMO we should be checking that if the library builds correctly before formatting, it should also build correctly afterwards, and that applies to all its tests, including doc tests.
Running the tests is not necessary, but the time it takes to run the tests of these libraries is negligible compared to the time it takes to build the tests. And knowing whether formatting changes alter the results of the tests in these libraries allows us to at least ping their maintainers on the nursery, or send PRs when things break.
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.
Ah, I see. I'll add that back in once I've worked out what is going on with the rustfmt failures
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.
Many of the failures are either warnings because the crates need pull request to remove deprecated options, or because rustfmt emits warnings or errors that the user cannot do anything about.
If there is nothing that the user can do about a warning or internal error, then the diagnostic should IMO be opt-in (e.g. behind a rustfmt --debug-output
or similar).
I've tried to enable these diagnostics here because even if they are opt-in, they should be fixed at some point. However a "red" allowed to fail travis build bot because of a warning can hide a change that actually breaks the build so... I did not know what the right way to proceed was here and did not wanted to add all buildbots twice...
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.
What's puzzling me is that some of the errors are meant to be opt-in with --error-on-unformatted
and when I run locally I don't see the errors, but running on CI is doing something different to my local setup.
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.
Maybe is a different rustfmt being picked up? I had that problem when I enabled the cargo cache on travis, so I disabled it. Or maybe your local rustfmt is different than the one here?
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.
I figured it out! The directories here are nested under rustfmt, whereas my local tests were not, that means they see rustfmt's rustfmt.toml which opts into the debug mode stuff. Testing now without that...
5854e61
to
653f6f4
Compare
r? @gnzlbg |
This LGTM. A way to fix #2274 would be to run cargo test before the formatting, and if that fails just cargo test --all
if [[ $? != 0 ]]; then
return 0
fi before the |
And emit rustfmt output so they can be debugged