Skip to content

Commit c016f8b

Browse files
authored
Rollup merge of #144042 - dpaoliello:verifyllvmcomp, r=jieyouxu
Verify llvm-needs-components are not empty and match the --target value I recently discovered a test with an empty `llvm-needs-components` entry (fixed in rust-lang/rust#143979) which meant that it didn't work correctly when building Rust with a limited set of LLVM targets. This change makes a pair of improvements to prevent this issue from creeping in again: * When parsing directives with values, `compiletest` will now raise an error if there is an empty value. * Improved the `target_specific_tests` tidy checker to map targets to LLVM components, to verify that any existing `llvm-needs-components` contains the target being used. I also fixed all the issues flagged by the improved tidy checker.
2 parents 39bf8e8 + 7954fa0 commit c016f8b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/tests/directives.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ See [Pretty-printer](compiletest.md#pretty-printer-tests).
293293

294294
- `no-auto-check-cfg` — disable auto check-cfg (only for `--check-cfg` tests)
295295
- [`revisions`](compiletest.md#revisions) — compile multiple times
296-
- [`unused-revision-names`](compiletest.md#ignoring-unused-revision-names) -
297-
suppress tidy checks for mentioning unknown revision names
298296
-[`forbid-output`](compiletest.md#incremental-tests) — incremental cfail rejects
299297
output pattern
300298
- [`should-ice`](compiletest.md#incremental-tests) — incremental cfail should
@@ -315,6 +313,17 @@ test suites that use those tools:
315313
- `llvm-cov-flags` adds extra flags when running LLVM's `llvm-cov` tool.
316314
- Used by [coverage tests](compiletest.md#coverage-tests) in `coverage-run` mode.
317315

316+
### Tidy specific directives
317+
318+
The following directives control how the [tidy script](../conventions.md#formatting)
319+
verifies tests.
320+
321+
- `ignore-tidy-target-specific-tests` disables checking that the appropriate
322+
LLVM component is required (via a `needs-llvm-components` directive) when a
323+
test is compiled for a specific target (via the `--target` flag in a
324+
`compile-flag` directive).
325+
- [`unused-revision-names`](compiletest.md#ignoring-unused-revision-names) -
326+
suppress tidy checks for mentioning unknown revision names.
318327

319328
## Substitutions
320329

0 commit comments

Comments
 (0)