[llvm] c5459a0 - Ignore FileCheck when profcheck is enabled (#151214)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 1 07:43:13 PDT 2025


Author: Mircea Trofin
Date: 2025-08-01T07:43:10-07:00
New Revision: c5459a0b57cbaacaca356a59148e2252d124b47b

URL: https://github.com/llvm/llvm-project/commit/c5459a0b57cbaacaca356a59148e2252d124b47b
DIFF: https://github.com/llvm/llvm-project/commit/c5459a0b57cbaacaca356a59148e2252d124b47b.diff

LOG: 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

Added: 
    

Modified: 
    llvm/test/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 915e387dac205..2462e006d63f6 100644
--- a/llvm/test/lit.cfg.py
+++ b/llvm/test/lit.cfg.py
@@ -18,7 +18,17 @@
 config.name = "LLVM"
 
 # testFormat: The test format to use to interpret tests.
-config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
+extra_substitutions = extra_substitutions = (
+    [
+        (r"\| not FileCheck .*", "> /dev/null"),
+        (r"\| FileCheck .*", "> /dev/null"),
+    ]
+    if config.enable_profcheck
+    else []
+)
+config.test_format = lit.formats.ShTest(
+    not llvm_config.use_lit_shell, extra_substitutions
+)
 
 # suffixes: A list of file extensions to treat as test files. This is overriden
 # by individual lit.local.cfg files in the test subdirectories.


        


More information about the llvm-commits mailing list