-
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
add support for "test revisions" into ui
tester
#48878
Comments
Mentoring instructionsBackground material is covered in the rustc-guide: The actual revision mechanism is orthogonal to the kind of test, and already exists. In particular, we will parse out the revisions, and when running tests, wind up here: rust/src/tools/compiletest/src/runtest.rs Lines 165 to 178 in fedce67
Note that the revision is stored in a field, rust/src/tools/compiletest/src/runtest.rs Lines 185 to 190 in fedce67
The UI test functionality is implemented starting here: rust/src/tools/compiletest/src/runtest.rs Line 2492 in fedce67
You can see that it loads the expected stderr/stdout here: rust/src/tools/compiletest/src/runtest.rs Lines 2504 to 2508 in fedce67
not complete |
Huh, wait a minute. All the code kind of looks right -- are we sure they don't work? =) |
OK, I dug a bit deeper. They don't work but they....sort of do. Actually the breakage is kind of deep in its own way. The function rust/src/tools/compiletest/src/runtest.rs Lines 1839 to 1848 in 7222241
However, you can see it actually does add an extension! This is a problem, because some of its callers also invoke One problem though: the |
@nikomatsakis I can try to fix this if you'd like. If I understand it correctly, there are roughly two things to fix:
Is there a particular reason to convert that shell script to Rust? Is that something you'd like done now, or would a simple tweak to glob all the appropriate paths be good enough? Anything else you'd like done with this? |
A simple tweak would be enough. The reason I had planned to convert to Rust was so that it would work on windows etc. But that's a fairly orthogonal task, and maybe it'd be better to step back and see if we can rethink the workflow anyway. For example, I doubt I would keep it as a separate script, now that I think about it, but rather I would roll it into
or
|
That'd be awesome, btw! |
OK, I'd be happy to work on it if you have a clear direction you want to go. Perhaps you have ideas on other things it would cover? I realize now I neglected to update the |
Maybe we should open a follow-up issue and discuss there. |
…akis Fix revision support for UI tests. Fixes rust-lang#48878
ui
tests do not current support revisions. This blocks our goals to migrate entirely over to unit tests. We should fix it!I imagine it working like this:
T.Ri.stderr
, whereRi
is the current revision//[Ri]~ ERROR
)However, it might be useful to permit tests to have a "fallback"
T.stderr
file, in which case the output is supposed to be the same for all revisions. I am of mixed minds about this though: I don't know how often it would be useful, and I fear "dead stderr files" that are not used. Probably best not to have it.The text was updated successfully, but these errors were encountered: