Description
So @spastorino recently hacked up a test to include two revisions, one of which enables NLL, by adding:
// revisions: lexical nll
#![cfg_attr(nll, feature(nll))]
This generates the following output:
running 1 test
test [run-pass] run-pass/generator/yield-subtype.rs ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 2883 filtered out
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:
running 2 tests
test [run-pass] run-pass/generator/yield-subtype.rs#nonlexical ... ok
test [run-pass] run-pass/generator/yield-subtype.rs#nll ... ok
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_test
function 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 run
function, 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.