Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upmake revisions in the test harness show up as independent tests #47604
Comments
nikomatsakis
added
A-testsuite
C-enhancement
T-compiler
E-mentor
labels
Jan 19, 2018
This comment has been minimized.
This comment has been minimized.
|
Tagging as E-mentor. I gave a few pointers in the description above, but of course happy to go into more detail. |
nikomatsakis
added
the
E-easy
label
Jan 19, 2018
spastorino
referenced this issue
Jan 19, 2018
Closed
Make revision tests show up as test.rs#revision #47605
This comment has been minimized.
This comment has been minimized.
totorigolo
commented
Jan 30, 2018
|
Can I take this one? |
This comment has been minimized.
This comment has been minimized.
|
@totorigolo I'd say yes, go ahead. In any case check with @nikomatsakis. This #47605 is a very close attempt to implement the thing. Some tests were failing and I gave up because I didn't have any time. It's probably very close, I couldn't even check what the error is about, hehe. |
This comment has been minimized.
This comment has been minimized.
totorigolo
commented
Feb 1, 2018
|
Can you explain which tests were failing? I applied your changes and everything seems to be working. |
This comment has been minimized.
This comment has been minimized.
|
Run |
This comment has been minimized.
This comment has been minimized.
totorigolo
commented
Feb 3, 2018
|
I ran
I don't understand why they fail, but they all seem unrelated to this issue. Here is the result of
|
This comment has been minimized.
This comment has been minimized.
|
I remember seeing failures in CI, hmmm. Could it be that this PR is actually ok?. |
This comment has been minimized.
This comment has been minimized.
|
@spastorino worth a try =) |
spastorino
referenced this issue
Feb 5, 2018
Closed
Make revision tests show up as test.rs#revision #48023
This comment has been minimized.
This comment has been minimized.
|
@totorigolo did you ever give this a try? |
This comment has been minimized.
This comment has been minimized.
|
cc @ehuss -- I think after your changes, we may be able to get this done! Want to give it a try? |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis yea, although it looks a little tricky. IIUC, incremental revisions are designed to be run in sequence, reusing the same directory. Supporting that is resulting in a lot of special-case code (directory names, |
This comment has been minimized.
This comment has been minimized.
|
@nikomatsakis I tried a slightly different approach with just a few special cases for Incremental. It works pretty well, however, I'm running into path-length problems on Windows. I tried sending |
This comment has been minimized.
This comment has been minimized.
|
I put the paths on a diet and things seem to pass on Windows (at least on my system). I have a patch here: ehuss@b558fa3 The commit comment should explain generally what I did. Let me know if you like the idea and you'd like me to post it as a PR. I also had a few questions:
|
This comment has been minimized.
This comment has been minimized.
|
Sorry for dropping off the face of the earth. Trying to catch up on notifications!
ah true, I forgot about that
will take a look! |
This comment has been minimized.
This comment has been minimized.
|
@ehuss at first glance, that looks good to me. Maybe open the PR and i'll parse it more carefully. |
nikomatsakis commentedJan 19, 2018
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:
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.