-
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
Convert all Makefile tests to rmake tests with legacy-makefile-test
#131598
Conversation
Originally I was hoping to be able to have real rmake recipes that just called a |
I'm not super keen on doing this just yet, because I feel like we're better served with waiting a bit and just yeeting the entire legacy infra in one go:
|
@@ -856,7 +864,7 @@ fn iter_header( | |||
return; | |||
} | |||
|
|||
let Some((header_revision, non_revisioned_directive_line)) = line_directive(comment, ln) | |||
let Some((header_revision, non_revisioned_directive_line)) = line_directive("//@", ln) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns out that line_directive
is also called by debugger tests to parse its own “directives” with a //
prefix. But I hope to be able to eventually split that off to use its own separate parsing function.
let mut props = { | ||
let file = match config.mode { | ||
Mode::RunMake => &testpaths.file.join("rmake.rs"), | ||
_ => &testpaths.file, | ||
}; | ||
TestProps::from_file(file, revision, &config) | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I'd like to experiment with making the canonical name of a run-make test be the path of its rmake.rs
, rather than the path of the enclosing directory. That should help eliminate a bunch of special cases for dealing with Mode::RunMake
.
But when I tried, there were enough little complications that I didn't want to do so immediately in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found working with the Testpaths
abstraction to be tricky, among other things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds reasonable to me. Yeah, there are some quirks with a specific primary test file vs directory, but I haven't done an extensive survey on that yet.
Fair enough. I'm happy to leave this sitting around as an experimental draft of an interesting idea, and if it turns out to be unnecessary (or unwise) then that's a fine outcome too. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
☔ The latest upstream changes (presumably #131895) made this pull request unmergeable. Please resolve the merge conflicts. |
We can't remove Makefile support from compiletest yet, because #121876 isn't quite complete.
But it occurred to me that we can remove some of the Makefile support with a neat little trick: give every legacy Makefile test a dummy
rmake.rs
file containing a special directive that tells compiletest to run the Makefile, instead of building and running the rmake recipe.Thus, while we still can't remove
run_rmake_legacy_test
, we can at least start removing Makefile support from the “frontend” parts like test discovery and directive parsing.Marking as draft for now because I want to let the idea bake a little more. But so far it does seem like a useful step towards being able to clean up various parts of the compiletest frontend.
r? ghost