-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
make revisions in the test harness show up as independent tests #47604
Copy link
Copy link
Closed
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Metadata
Metadata
Assignees
Labels
A-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
So @spastorino recently hacked up a test to include two revisions, one of which enables NLL, by adding:
This generates the following output:
at which point the question is -- did both of those revisions really run successfully?
Currently, if a test has N revisions, we run them all as part of its "main line". It'd be more reassuring if we made the revision part of the test name, so that you get output like:
The "early properties" of a test (which are gathered while we are assembling the list of tests) already contains the list of revisions:
rust/src/tools/compiletest/src/header.rs
Line 29 in 5965b79
Therefore, it should be a relatively simple thing to extend the
make_testfunction to return not one test, but potentially many tests (one for each revision):rust/src/tools/compiletest/src/main.rs
Line 600 in 5965b79
We would of course have to modify the test description to include which revision to run, and modify the
runfunction, since that is the one that currently iterates over the list of revisions:rust/src/tools/compiletest/src/runtest.rs
Lines 165 to 178 in 5965b79
But this shouldn't be a big change, I wouldn't think.