Breakup test.rs into more-manageable sub-modules#137224
Breakup test.rs into more-manageable sub-modules#137224jieyouxu wants to merge 25 commits intorust-lang:masterfrom
test.rs into more-manageable sub-modules#137224Conversation
…_self_tests` module
…ol_tests` module
…ustdoc_tests` module
…piler_crate_tests` module
… own `dist_tool_tests` module
test.rs into more-manageable modulestest.rs into more-manageable sub-modules
|
I may redo this after #137215. |
onur-ozkan
left a comment
There was a problem hiding this comment.
Looking at the new files, I think they seem more complicated than before. The policy or motivation behind this splitting logic is unclear.
Example of things that are unclear:
std_testscan also contain cargo tests, but there is a module called cargotest. Where should we put cargo tests of a program?- Why some tools (like compiletest and rustdoc) have separate module for its tests but not other tools?
- What does cargotest mean? Is it for running cargo tests on projects, or is it for running tests of cargo tool?
- When to create a separate module for tests? What is the right time for it?
- ...the list can go very long.
The separation logic should be very clear and not require us to think too much about when to create a test module or where to place a test.
I'm pretty sure that if we use this structure people will start asking in Zulip threads "Which module should I use to add this test?".
I suggest to keep the module separation as simple and basic as possible.
|
@rustbot author |
|
Yeah, I'm not super happy about how this ended up. I'll have to rethink this a bit. |
|
|
I'll probably revisit this in the future, so closing for the time being. |
Part of Tracking issue for bootstrap test step cleanups #137178.
Summary of changes
Split up
test.rsinto smaller, more logically organized sub-modules.test.rsfile.testdirto usebuilder.test_out(to prevent reinventingbuilder.test_outand having yet another place that might desync in the future).More context
test.rsinto smaller modules by test kind #135072.Review advice
r? @onur-ozkan
Footnotes
For some definition of atomic, I suppose ↩