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

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 1 07:11:02 PDT 2025


https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/151214

>From 1f3b25ba9b62a8324562eefaf6165505629b8ce2 Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Tue, 29 Jul 2025 12:55:59 -0700
Subject: [PATCH] fixes

---
 llvm/test/lit.cfg.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

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