Skip to content

Filter ui revision tests #59250

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

Merged
merged 3 commits into from
Mar 18, 2019
Merged

Conversation

bovinebuddha
Copy link
Contributor

Updates UI test output filtering to also filter away test annotations for revisions:

Previously filtered: //~ ERROR [XXXX]
Now also filters: //[revision]~ ERROR [XXXX]

I reckon, if we have the one, we should have the other for consistency, its lack was probably an oversight (the existence of revision testing is not really well documented...)

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nikomatsakis (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 17, 2019
@petrochenkov
Copy link
Contributor

This is just an oversight, yes, thanks for fixing it.

You may want to check whether fulldeps tests and NLL tests are updated properly.

./x.py test --bless src/test/ui --compare-mode nll
./x.py test --bless src/test/ui-fulldeps

and otherwise search for accidental //[revision]~s in .stderr and .stdout files that could remain due to tests not running on all platforms.

r=me after that

@bovinebuddha
Copy link
Contributor Author

r? @petrochenkov

I applied some sed-magic to the test folder, hopefully this will fix all the tests I didn't/couldn't run.

@petrochenkov
Copy link
Contributor

@bors r+ p=1

I suspect that these ones are just stray files and can be removed though

E0508.ast.stderr
E0508.mir.stderr
borrowck/borrowck-union-borrow.mir.stderr

@bors
Copy link
Collaborator

bors commented Mar 17, 2019

📌 Commit 9eedfdea35797da3cc03acf9882ca2b9df87f2f2 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 17, 2019
@bovinebuddha
Copy link
Contributor Author

@petrochenkov Do you want me to remove those files? Also, what is the common practice, should I squash the last two commits (and possibly the last one) into one commit? Or maybe noone cares?

@petrochenkov
Copy link
Contributor

@bovinebuddha
If you remove the tests, I'll re-r+.
In this case I don't think any squashing is required (people generally care to various degree, depending on reviewer).

@bovinebuddha
Copy link
Contributor Author

bovinebuddha commented Mar 17, 2019

I found 402 other stderr revision files which are no longer used.... I'd like to remove them all, but maybe I'll do that in another PR once this lands.

Would it be okay to add a bash script under src/test with a make command to remove these extraneous files? It was a 'simple' exercise of find, grep, sed. Or should something maybe be added to x.py instead?

@petrochenkov
Copy link
Contributor

@bovinebuddha

I found 402 other stderr revision files which are no longer used

Are you sure those are not produced by NLL tests or something?

Would it be okay to add a bash script under src/test with a make command to remove these extraneous files?

We already have a check for unused files in tools/tidy/src/ui_tests.rs, it's run during x.py test tidy and can be expanded if necessary.

@bovinebuddha bovinebuddha force-pushed the filter_ui_revision_tests branch from 9eedfde to 704649d Compare March 17, 2019 16:03
@bovinebuddha
Copy link
Contributor Author

Ah, you were right of course. Those were all nll checks plus a few false positives by me. I didn't realize that revisions and the nll compare mode had the same mechanism for generating stderr files...

I pushed a commit which removed the files you mentioned, there were no other obsolete files I could find.

@bovinebuddha
Copy link
Contributor Author

@petrochenkov Thanks for the help, and please r+ when you have the time :)

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 17, 2019

📌 Commit 704649d has been approved by petrochenkov

@bovinebuddha
Copy link
Contributor Author

@petrochenkov

How do you actually know which tests are executed for each compare mode? I was thinking about updating 'tools/tidy/src/ui_tests.rs' to check if the test actually specified the relevant revision. I don't know where to check to resolve mode/revision ambiguity though.

@petrochenkov
Copy link
Contributor

I'm not entirely sure, but from what I can infer from code in compiletest the .nll versions of output are created only if they are different from non-NLL output.
So, each test in test suites that are run with NLL (i.e. ui and run-pass) can potentially produce an .nll file.

Revisions that are run for each specific test are specified in its // revisions: clause.

@bovinebuddha
Copy link
Contributor Author

Hmmm, I see. I also find this fascinating 'ignore-compare-mode-nll' annotations in tests which actually specify nll as a revision. I guess any check would have to hardcode all possible compare modes for their possible existence.

@bors
Copy link
Collaborator

bors commented Mar 17, 2019

⌛ Testing commit 704649d with merge 817d074...

bors added a commit that referenced this pull request Mar 17, 2019
…chenkov

Filter ui revision tests

Updates UI test output filtering to also filter away test annotations for revisions:

Previously filtered: //~ ERROR [XXXX]
Now also filters: //[revision]~ ERROR [XXXX]

I reckon, if we have the one, we should have the other for consistency, its lack was probably an oversight (the existence of revision testing is not really well documented...)
@bors
Copy link
Collaborator

bors commented Mar 18, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: petrochenkov
Pushing 817d074 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 18, 2019
@bors bors merged commit 704649d into rust-lang:master Mar 18, 2019
@bovinebuddha bovinebuddha deleted the filter_ui_revision_tests branch March 18, 2019 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants