File tree 2 files changed +32
-0
lines changed
2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -598,6 +598,21 @@ fn test_foo() {
598
598
}
599
599
```
600
600
601
+ In test suites that use the LLVM [ FileCheck] tool, the current revision name is
602
+ also registered as an additional prefix for FileCheck directives:
603
+
604
+ ``` rust,ignore
605
+ //@ revisions: NORMAL COVERAGE
606
+ //@ [COVERAGE] compile-flags: -Cinstrument-coverage
607
+ //@ [COVERAGE] needs-profiler-support
608
+
609
+ // COVERAGE: @__llvm_coverage_mapping
610
+ // NORMAL-NOT: @__llvm_coverage_mapping
611
+
612
+ // CHECK: main
613
+ fn main() {}
614
+ ```
615
+
601
616
Note that not all headers have meaning when customized to a revision.
602
617
For example, the ` ignore-test ` header (and all "ignore" headers)
603
618
currently only apply to the test as a whole, not to particular
@@ -609,6 +624,7 @@ Following is classes of tests that support revisions:
609
624
- UI
610
625
- assembly
611
626
- codegen
627
+ - coverage
612
628
- debuginfo
613
629
- rustdoc UI tests
614
630
- incremental (these are special in that they inherently cannot be run in parallel)
Original file line number Diff line number Diff line change @@ -95,6 +95,9 @@ found in [`header.rs`] from the compiletest source.
95
95
for a known bug that has not yet been fixed
96
96
* [ Assembly] ( compiletest.md#assembly-tests ) headers
97
97
* ` assembly-output ` — the type of assembly output to check
98
+ * [ Tool-specific headers] ( #tool-specific-headers )
99
+ * ` filecheck-flags ` - passes extra flags to the ` FileCheck ` tool
100
+ * ` llvm-cov-flags ` - passes extra flags to the ` llvm-cov ` tool
98
101
99
102
100
103
### Ignoring tests
@@ -231,6 +234,19 @@ test suites.
231
234
to be loaded by the host compiler.
232
235
233
236
237
+ ### Tool-specific headers
238
+
239
+ The following headers affect how certain command-line tools are invoked,
240
+ in test suites that use those tools:
241
+
242
+ * ` filecheck-flags ` adds extra flags when running LLVM's ` FileCheck ` tool.
243
+ - Used by [ codegen tests] ( compiletest.md#codegen-tests ) ,
244
+ [ assembly tests] ( compiletest.md#assembly-tests ) , and
245
+ [ MIR-opt tests] ( compiletest.md#mir-opt-tests ) .
246
+ * ` llvm-cov-flags ` adds extra flags when running LLVM's ` llvm-cov ` tool.
247
+ - Used by [ coverage tests] ( compiletest.md#coverage-tests ) in ` coverage-run ` mode.
248
+
249
+
234
250
## Substitutions
235
251
236
252
Headers values support substituting a few variables which will be replaced
You can’t perform that action at this time.
0 commit comments