-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
x test on profiles where testing is unsupported (or unmaintained?) could set better expectations #158385
Copy link
Copy link
Open
Labels
A-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)Area: test infrastructure (may span bootstrap/compiletest/more)A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
Activity
Metadata
Metadata
Assignees
Labels
A-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)Area: test infrastructure (may span bootstrap/compiletest/more)A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Context
If you run test suites with
x.py test(sub)command(s) in environments we don't run it in in CI, they may fail. That's natural and expected, of course, but the tooling output doesn't make it particularly clear what usage is or isn't intended.If the user is on a weird platform or such, this might be expected anyway; it becomes surprising if the thing that caused a faulure is merely a different
bootstrap.tomlsetup. Most notably if the setup happens to be exactly one of the presets thatx.py setupoffers.As an extreme example of the confusion this may lead to: A plain
x.py testwithout any extra arguments, with a basicprofile = "dist"profile (created inx.py setup), on a normalx86_64-unknown-linux-gnu(Ubuntu) setup, used to1 be prominently displaying an ICE error message as part the first failing test.An initial search for similar/related kinds of issues had me finding
./x test library/stdfails with library profile #142505which seems to also fit this category of problems (though in this case, it's more obviously a case where things should actually just be fixed).
Questions
On one hand, I have some remaining questions about the
distprofile: Is thedistprofile in particular even meant to be used with commands likex test? I also wonder (i.e. haven't quite figured out yet) what about it makes it more prone to test failures in particular?On the other hand, I would be interested in judging potential ways forward so that someone who sees a test failure wouldn't even need to wonder about such fundamental things as “is this supposed to work in the first place?”.
👉 expand/collapse the list - [I’m trying not to take away all the focus from the first question]
certain profiles could "disable"2 certain
x.pysubcommands that aren't intended/meant to work anyway, to stop them from running before they even beginbootstrap.toml, or maybe pass an extra argument, to run the test anywayor instead, nothing should change - reasons for this may include:
x testshouldn't fail ondistin the first place because[xyz], we should just fix thisor instead, certain profiles could emit extra warnings/notes with certain
x.pysubcommandschange-idwarnings, showing both at the start and end of invocationor instead, something else? Or a combination of things?
Footnotes
at the time of this writing waiting for the merge queue ↩
that is, always produce an error message when it's used ↩
it would ideally be easy to configure certain configuration+command usage patterns, if "known issues" (like
./x test library/stdon library profile) should be handled, so contributors can keep them up-to-date easily ↩