[EXPLORATORY] bootstrap: break up test.rs into smaller modules by test kind#135072
[EXPLORATORY] bootstrap: break up test.rs into smaller modules by test kind#135072jieyouxu wants to merge 2 commits intorust-lang:masterfrom
test.rs into smaller modules by test kind#135072Conversation
|
A few quick notes based on my own exploration:
|
|
Please assign/ping me once it's ready. |
I'll open a separate PR with a sequence of (more-or-less) atomic commits to split out the modules one-by-one, once we figure out what to do with the weirder test |
|
Another thought: if we’re doing a module split and a renaming, maybe we can use the modules as part of the naming convention. So instead of |
|
Indeed we could. |
|
☔ The latest upstream changes (presumably #135095) made this pull request unmergeable. Please resolve the merge conflicts. |
| impl Step for CollectLicenseMetadata { | ||
| type Output = PathBuf; | ||
| const ONLY_HOSTS: bool = true; | ||
|
|
||
| fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> { | ||
| run.path("src/tools/collect-license-metadata") | ||
| } | ||
|
|
||
| fn make_run(run: RunConfig<'_>) { | ||
| run.builder.ensure(CollectLicenseMetadata); | ||
| } | ||
|
|
||
| fn run(self, builder: &Builder<'_>) -> Self::Output { | ||
| let Some(reuse) = &builder.config.reuse else { | ||
| panic!("REUSE is required to collect the license metadata"); | ||
| }; | ||
|
|
||
| let dest = builder.src.join("license-metadata.json"); | ||
|
|
||
| let mut cmd = builder.tool_cmd(Tool::CollectLicenseMetadata); | ||
| cmd.env("REUSE_EXE", reuse); | ||
| cmd.env("DEST", &dest); | ||
| cmd.env("ONLY_CHECK", "1"); | ||
| cmd.run(builder); | ||
|
|
||
| dest | ||
| } | ||
| } |
There was a problem hiding this comment.
Also wait, is this really a test?
There was a problem hiding this comment.
I think the ONLY_CHECK=1 is what makes it a test.
|
Closing in favor of #137224. |
Exploratory work for https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Renaming.20test.20step.20structs.
cc bootstrap: Apply a clearer naming convention to many of the test steps #135071.
No functional changes, only moving stuff around.
r? @ghost