Skip to content

Commit c5459a0

Browse files
authored
Ignore FileCheck when profcheck is enabled (#151214)
When profcheck is enabled (presumably on a specific build bot), we want to ignore FileCheck because we're only interested in profile validation, and some tests are sensitive to the precise IR output, which profile validation alters slightly by inserting profile metadata. Issue #147390
1 parent be03d25 commit c5459a0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

llvm/test/lit.cfg.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@
1818
config.name = "LLVM"
1919

2020
# testFormat: The test format to use to interpret tests.
21-
config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
21+
extra_substitutions = extra_substitutions = (
22+
[
23+
(r"\| not FileCheck .*", "> /dev/null"),
24+
(r"\| FileCheck .*", "> /dev/null"),
25+
]
26+
if config.enable_profcheck
27+
else []
28+
)
29+
config.test_format = lit.formats.ShTest(
30+
not llvm_config.use_lit_shell, extra_substitutions
31+
)
2232

2333
# suffixes: A list of file extensions to treat as test files. This is overriden
2434
# by individual lit.local.cfg files in the test subdirectories.

0 commit comments

Comments
 (0)