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

Reduce the entry on src/test/ui (UI test root) #80539

Merged
merged 9 commits into from
Jan 1, 2021

Conversation

JohnTitor
Copy link
Member

CC #73494, similar to #79776.

r? @petrochenkov

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 31, 2020
@nagisa
Copy link
Member

nagisa commented Dec 31, 2020

For what it is worth I always have trouble figuring out whether I should just drop a test at the root or, if not, which directory I should use, when I am adding a test. Having to deal with a fairly arbitrary limit on number of tests seems like a notable contributor roadblock to me.

@jyn514
Copy link
Member

jyn514 commented Dec 31, 2020

@nagisa I think if there's no hard limit this is an improvement. If there are ~100 files to start, then 101 isn't a big deal, it's only an issue because so many have accumulated over time.

@JohnTitor
Copy link
Member Author

JohnTitor commented Dec 31, 2020

Note that the current entry is 1571 (vs. the limit is 1580) and this PR's is 1487 (vs. the limit is 1500) so the limit has hardly changed.
The hard limit is useful to reduce the moving work and we could ask the contributor to increase the limit value if needed (e.g., adding a new directory).

@petrochenkov
Copy link
Contributor

Two comments:

  • "block" in some of the tests moved in c53dd6b is the old (pre-1.0) name for closures, so these tests now test Fn() and similar stuff rather than block expressions. Perhaps they can be moved to src\test\ui\closures with replacing "block" with e.g. "old-closure" in their names. It's also quite possible that those tests can be safely removed now.
  • Looks like src\test\ui\feature-gates and src\test\ui\feature-gate are merged in this PR. I think the idea of the separation was to have one directory for specific feature gates (whose presence is checked by src\tools\tidy\src\features.rs) and another directory for the feature-gating mechanism itself. Merging them can still be better due to reduced confusion though.

@petrochenkov
Copy link
Contributor

r=me with or without addressing the comments.

@petrochenkov petrochenkov 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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 31, 2020
@JohnTitor
Copy link
Member Author

  • "block" in some of the tests moved in c53dd6b is the old (pre-1.0) name for closures, so these tests now test Fn() and similar stuff rather than block expressions. Perhaps they can be moved to src\test\ui\closures with replacing "block" with e.g. "old-closure" in their names. It's also quite possible that those tests can be safely removed now.

Makes sense, renamed "block" to "old-closure" and moved to the "closures" dir (didn't remove them just in case).

  • Looks like src\test\ui\feature-gates and src\test\ui\feature-gate are merged in this PR. I think the idea of the separation was to have one directory for specific feature gates (whose presence is checked by src\tools\tidy\src\features.rs) and another directory for the feature-gating mechanism itself. Merging them can still be better due to reduced confusion though.

I think it reduces confusion too, I'm going to merge them but if someone thinks it should be separated, we could revert that commit and rename the dirs to something like feature-gate-checks and feature-gate-itself.

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Dec 31, 2020

📌 Commit 94fac1cfdadd779a08299d5ee4b80a9de6627d8a 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 Dec 31, 2020
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-9 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
.................................................................................................... 900/11231
.................................................................................................... 1000/11231
...........................................i........................................................ 1100/11231
.................................................................................................... 1200/11231
.........................................................................................F........ii 1300/11231
.iF............i.................................................................................... 1400/11231
.................................................................................................... 1600/11231
.................................................................................................... 1700/11231
.................................................................................................... 1800/11231
.................................................................................................... 1900/11231
---
.................................................................................................... 9000/11231
.................................................................................................... 9100/11231
.................................................................................................... 9200/11231
............................i......i................................................................ 9300/11231
...................................................................iiiiii..iiiiii.i................. 9400/11231
.................................................................................................... 9600/11231
.................................................................................................... 9700/11231
.................................................................................................... 9800/11231
.................................................................................................... 9900/11231
---
.......................i............................................................................ 11200/11231
...............................
failures:

---- [ui] ui/closures/old-closure-expression-remove-semicolon.rs stdout ----

1 error[E0308]: mismatched types
-   --> $DIR/block-expression-remove-semicolon.rs:8:19
+   --> $DIR/old-closure-expression-remove-semicolon.rs:8:19
+   --> $DIR/old-closure-expression-remove-semicolon.rs:8:19
3    |
4 LL |       let _x: i32 = {


The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/old-closure-expression-remove-semicolon/old-closure-expression-remove-semicolon.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args closures/old-closure-expression-remove-semicolon.rs`
error: 1 errors occurred comparing output.
status: exit code: 1
status: exit code: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/closures/old-closure-expression-remove-semicolon.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/old-closure-expression-remove-semicolon" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/old-closure-expression-remove-semicolon/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
error[E0308]: mismatched types
  --> /checkout/src/test/ui/closures/old-closure-expression-remove-semicolon.rs:8:19
   |
LL |       let _x: i32 = {
   |  ___________________^
LL | |         //~^ ERROR mismatched types
LL | |         foo(); //~ HELP consider removing this semicolon
   | |              - help: consider removing this semicolon
LL | |     };
   | |_____^ expected `i32`, found `()`
error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.


------------------------------------------


---- [ui] ui/closures/old-closure-expr-precedence.rs stdout ----

1 warning: unnecessary trailing semicolons
-   --> $DIR/block-expr-precedence.rs:60:21
+   --> $DIR/old-closure-expr-precedence.rs:60:21
+   --> $DIR/old-closure-expr-precedence.rs:60:21
3    |
4 LL |   if (true) { 12; };;; -num;
5    |                     ^^ help: remove these semicolons

The actual stderr differed from the expected stderr.
The actual stderr differed from the expected stderr.
Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/old-closure-expr-precedence/old-closure-expr-precedence.stderr
To update references, rerun the tests and pass the `--bless` flag
To only update this specific test, also pass `--test-args closures/old-closure-expr-precedence.rs`
error: 1 errors occurred comparing output.
status: exit code: 0
status: exit code: 0
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/closures/old-closure-expr-precedence.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zemit-future-incompat-report" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/old-closure-expr-precedence/a" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/closures/old-closure-expr-precedence/auxiliary"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
warning: unnecessary trailing semicolons
  --> /checkout/src/test/ui/closures/old-closure-expr-precedence.rs:60:21
   |
LL |   if (true) { 12; };;; -num;
   |                     ^^ help: remove these semicolons
   = note: `#[warn(redundant_semicolons)]` on by default

warning: 1 warning emitted

---

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "ui" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-9/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "9.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit passes perfjitevents powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test --exclude src/tools/tidy
Build completed unsuccessfully in 0:16:32

@JohnTitor
Copy link
Member Author

Oops, forgot to bless the tests, @bors r-

@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 Jan 1, 2021
@JohnTitor
Copy link
Member Author

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Jan 1, 2021

📌 Commit 9fb9f29 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 Jan 1, 2021
@bors
Copy link
Contributor

bors commented Jan 1, 2021

⌛ Testing commit 9fb9f29 with merge e1fc9ff...

@bors
Copy link
Contributor

bors commented Jan 1, 2021

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing e1fc9ff to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 1, 2021
@bors bors merged commit e1fc9ff into rust-lang:master Jan 1, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 1, 2021
@JohnTitor JohnTitor deleted the ui-test-root-cleanup branch January 1, 2021 12:15
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.

8 participants