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 UI test files #50793

Merged
merged 3 commits into from
May 17, 2018
Merged

tidy: Add a check for empty UI test files #50793

merged 3 commits into from
May 17, 2018

Conversation

yaahc
Copy link
Member

@yaahc yaahc commented May 16, 2018

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 #50785

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (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 May 16, 2018
@yaahc
Copy link
Member Author

yaahc commented May 16, 2018

#50785

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
tidy check
[00:05:20] * 540 error codes
[00:05:20] * highest error code: E0911
[00:05:21] * 200 features
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/reachable/expr_oror.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/reachable/expr_andand.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/feature-gate-const-indexing.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/const-eval/const_transmute.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/const-pattern-not-const-evaluable.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/union/union-const-eval.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/nll/maybe-initialized-drop-uninitialized.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/nll/drop-may-dangle.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/nll/ty-outlives/ty-param-implied-bounds.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/print_type_sizes/anonymous.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/print_type_sizes/anonymous.stdout"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/print_type_sizes/repr-align.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/print_type_sizes/multiple_types.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/print_type_sizes/packed.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/issue-38875/issue_38875.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/rfc1598-generic-associated-types/shadowing.stdout"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.stderr"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/compare-method/region-extra.stdout"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/compare-method/region-unrelated.stdout"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/compare-method/proj-outlives-region.stdout"
[00:05:21] Empty file with UI testing output: "/checkout/src/test/ui/const-expr-addr-operator.stderr"
[00:05:21] some tidy checks failed
[00:05:21] 
[00:05:21] 
[00:05:21] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/tidy" "/checkout/src" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "--no-vendor" "--quiet"
[00:05:21] 
[00:05:21] 
[00:05:21] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test src/tools/tidy
[00:05:21] Build completed unsuccessfully in 0:02:08
[00:05:21] Build completed unsuccessfully in 0:02:08
[00:05:21] Makefile:79: recipe for target 'tidy' failed
[00:05:21] make: *** [tidy] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0fe93180
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@petrochenkov petrochenkov assigned petrochenkov and unassigned aturon May 16, 2018
@petrochenkov
Copy link
Contributor

Everything looks good, thanks!
@bors r+

@bors
Copy link
Contributor

bors commented May 16, 2018

📌 Commit e8eda65 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 May 16, 2018
@kennytm
Copy link
Member

kennytm commented May 16, 2018

@bors r-

Some new empty UI test files appeared. Please rebase on the latest master and retry. (You need to delete src/test/ui/trivial-bounds-inconsistent-associated-functions.stderr which was introduced by #48557)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 16, 2018
yaahc added 3 commits May 16, 2018 10:19
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.
@kennytm
Copy link
Member

kennytm commented May 16, 2018

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented May 16, 2018

📌 Commit 6ed200a 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 16, 2018
kennytm added a commit to kennytm/rust that referenced this pull request 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
bors added a commit that referenced this pull request May 17, 2018
Rollup of 17 pull requests

Successful merges:

 - #50170 (Implement From for more types on Cow)
 - #50638 (Don't unconditionally set CLOEXEC twice on every fd we open on Linux)
 - #50656 (Fix `fn main() -> impl Trait` for non-`Termination` trait)
 - #50669 (rustdoc: deprecate `#![doc(passes, plugins, no_default_passes)]`)
 - #50726 (read2: Use inner function instead of closure)
 - #50728 (Fix rustdoc panic with `impl Trait` in type parameters)
 - #50736 (env: remove unwrap in examples in favor of try op)
 - #50740 (Remove LazyBTreeMap.)
 - #50752 (Add missing error codes in libsyntax-ext asm)
 - #50779 (Make mutable_noalias and arg_align_attributes be tracked)
 - #50787 (Fix run-make wasm tests)
 - #50788 (Fix an ICE when casting a nonexistent const)
 - #50789 (Ensure libraries built in stage0 have unique metadata)
 - #50793 (tidy: Add a check for empty UI test files)
 - #50797 (fix a typo in signed-integer::from_str_radix())
 - #50808 (Stabilize num::NonZeroU*)
 - #50809 (GitHub: Stop treating Cargo.lock as a generated file.)

Failed merges:
@bors bors merged commit 6ed200a into rust-lang:master May 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

6 participants