Skip to content

Commit 09f59a1

Browse files
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 (rust-lang/rust#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/rust#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
2 parents cdcdf6b + d5f2e98 commit 09f59a1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/tests/directives.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ See [Pretty-printer](compiletest.md#pretty-printer-tests).
326326
The following directives affect how certain command-line tools are invoked, in
327327
test suites that use those tools:
328328

329+
- `skip-filecheck` avoids running LLVM's `FileCheck` tool in tests that would normally run it to check output.
330+
- Used by codegen tests, assembly tests, and mir-opt tests.
329331
- `filecheck-flags` adds extra flags when running LLVM's `FileCheck` tool.
330332
- Used by [codegen tests](compiletest.md#codegen-tests),
331333
[assembly tests](compiletest.md#assembly-tests), and

0 commit comments

Comments
 (0)