Make //@ skip-filecheck a normal compiletest directive#155630
Make //@ skip-filecheck a normal compiletest directive#155630rust-bors[bot] merged 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. |
|
Moved #155630 (comment) into a separate issue to track (#155665) |
Make `//@ skip-filecheck` a normal compiletest directive The `skip-filecheck` directive is currently used by mir-opt tests, to suppress the default behaviour of running LLVM's `FileCheck` tool to check MIR output against FileCheck rules in the test file. The `skip-filecheck` directive was not included in the big migration to `//@` directive syntax (rust-lang#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-pass` directive, 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-filecheck` directive, 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-pass` in codegen tests to skip FileCheck was introduced in rust-lang#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
…uwer Rollup of 10 pull requests Successful merges: - #146544 (mir-opt: Remove the workaround in UnreachableEnumBranching) - #154819 (Fix ICE for inherent associated type mismatches) - #155265 (Improved assumptions relating to isqrt) - #152576 (c-variadic: use `emit_ptr_va_arg` for mips) - #154481 (Mark a function only used in nightly as nightly only) - #155614 (c-variadic: rename `VaList::arg` to `VaList::next_arg`) - #155630 (Make `//@ skip-filecheck` a normal compiletest directive) - #155641 (Remove non-working code for "running" mir-opt tests) - #155652 (Expand `Path::is_empty` docs) - #155656 (rustc_llvm: update opt-level handling for LLVM 23)
Rollup merge of #155630 - Zalathar:skip-filecheck, r=jieyouxu Make `//@ skip-filecheck` a normal compiletest directive The `skip-filecheck` directive is currently used by mir-opt tests, to suppress the default behaviour of running LLVM's `FileCheck` tool to check MIR output against FileCheck rules in the test file. The `skip-filecheck` directive 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-pass` directive, 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-filecheck` directive, 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-pass` in 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
…uwer Rollup of 10 pull requests Successful merges: - rust-lang/rust#146544 (mir-opt: Remove the workaround in UnreachableEnumBranching) - rust-lang/rust#154819 (Fix ICE for inherent associated type mismatches) - rust-lang/rust#155265 (Improved assumptions relating to isqrt) - rust-lang/rust#152576 (c-variadic: use `emit_ptr_va_arg` for mips) - rust-lang/rust#154481 (Mark a function only used in nightly as nightly only) - rust-lang/rust#155614 (c-variadic: rename `VaList::arg` to `VaList::next_arg`) - rust-lang/rust#155630 (Make `//@ skip-filecheck` a normal compiletest directive) - rust-lang/rust#155641 (Remove non-working code for "running" mir-opt tests) - rust-lang/rust#155652 (Expand `Path::is_empty` docs) - rust-lang/rust#155656 (rustc_llvm: update opt-level handling for LLVM 23)
…uwer Rollup of 10 pull requests Successful merges: - rust-lang/rust#146544 (mir-opt: Remove the workaround in UnreachableEnumBranching) - rust-lang/rust#154819 (Fix ICE for inherent associated type mismatches) - rust-lang/rust#155265 (Improved assumptions relating to isqrt) - rust-lang/rust#152576 (c-variadic: use `emit_ptr_va_arg` for mips) - rust-lang/rust#154481 (Mark a function only used in nightly as nightly only) - rust-lang/rust#155614 (c-variadic: rename `VaList::arg` to `VaList::next_arg`) - rust-lang/rust#155630 (Make `//@ skip-filecheck` a normal compiletest directive) - rust-lang/rust#155641 (Remove non-working code for "running" mir-opt tests) - rust-lang/rust#155652 (Expand `Path::is_empty` docs) - rust-lang/rust#155656 (rustc_llvm: update opt-level handling for LLVM 23)
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