Make //@ skip-filecheck a normal compiletest directive#155630
Make //@ skip-filecheck a normal compiletest directive#155630Zalathar wants to merge 2 commits intorust-lang:mainfrom
//@ skip-filecheck a normal compiletest directive#155630Conversation
|
The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. Some changes occurred in src/tools/compiletest cc @jieyouxu
|
|
Oh nice yes, this is something that was mildly annoying to me 👍 I'll take a look soon |
|
Non-blocking cc @davidtwco on the fact that In that test, skipping FileCheck seems to have been unintentional. Unfortunately we can't just re-enable FileCheck for that test, because the current FileCheck assertions appear to be broken. |
Skipping FileCheck in codegen/assembly tests is normally not very useful, but a small number of existing tests were using `//@ build-pass` to do so anyway, so it's clearer for them to explicitly use `//@ skip-filecheck` instead.
c4db3ee to
1e8cd1f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
The
skip-filecheckdirective is currently used by mir-opt tests, to suppress the default behaviour of running LLVM'sFileChecktool to check MIR output against FileCheck rules in the test file.The
skip-filecheckdirective was not included in the big migration to//@directive syntax (#121370), perhaps because it was parsed and processed in the miropt-test-tools helper crate, not in compiletest itself.Recently I noticed that a small number of codegen-llvm tests were using the
//@ build-passdirective, which has the non-obvious effect of skipping FileCheck in codegen tests. That's quite confusing, so I decided to have the mir-opt tests migrate over to a proper//@ skip-filecheckdirective, which could then be used by codegen tests as well.(I also added skip-filecheck support to assembly tests, which are very similar to codegen tests, though there are currently no assembly tests that actually use
//@ skip-filecheck.)Support for using
//@ build-passin codegen tests to skip FileCheck was introduced in #113603. With hindsight, I think doing things that way was pretty clearly a mistake, and we'll be better off with//@ skip-filecheck.r? jieyouxu