-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[EXPLORATORY] bootstrap: break up test.rs
into smaller modules by test kind
#135072
base: master
Are you sure you want to change the base?
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also wait, is this really a test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the ONLY_CHECK=1
is what makes it a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noted this in #135231.
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