Skip to content
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

tidy: Add a check for empty .stderr and .stdout files in UI test directories #50785

Closed
petrochenkov opened this issue May 15, 2018 · 1 comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@petrochenkov
Copy link
Contributor

Tidy check in https://github.com/rust-lang/rust/blob/master/src/tools/tidy/src/ui_tests.rs makes sure that we don't have stray testname.stderr/testname.stdout files without a corresponding testname.rs.

It would be useful to add one more check into the same file making sure that testname.stderr/testname.stdout files are not empty.
Such empty files can still pass testing for compile-pass tests with no output so they can get into the repo accidentally, but they are not necessary and can be removed.

@petrochenkov petrochenkov added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-testsuite Area: The testsuite used to check the correctness of rustc E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels May 15, 2018
@yaahc
Copy link
Member

yaahc commented May 15, 2018

I'd like to take this issue.

kennytm added a commit to kennytm/rust that referenced this issue May 16, 2018
tidy: Add a check for empty UI test files

Check for empty `.stderr` and `.stdout` files in UI test directories.
Empty files could  still pass testing for `compile-pass` tests with no output
so they can get into the repo accidentally, but they are not necessary and can
be removed.

This is very much an in progress pull request. I'm having an issue with rustfmt. It wanted to reformat the entire file for almost every file by default. And when I run tidy it just errors out because it catches the empty files that are already in the repo.

My next step is goin got be to remove those empty file and see if running tidy again will actually reformat things outside of the context of `cargo fmt`

Fixes rust-lang#50785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

No branches or pull requests

2 participants