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

Mircea Trofin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jul 31 12:53:15 PDT 2025


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

>From e6467e2025cf473486313319115a839efdc35ea4 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 | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py
index 1d190fd20e573..43c7cf677a913 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 .*", "| tee /dev/null"),
+        (r"\| FileCheck .*", "| tee /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.
@@ -278,6 +288,7 @@ def get_asan_rtlib():
     ]
 )
 
+
 # Find (major, minor) version of ptxas
 def ptxas_version(ptxas):
     ptxas_cmd = subprocess.Popen([ptxas, "--version"], stdout=subprocess.PIPE)
@@ -602,7 +613,6 @@ def host_unwind_supports_jit():
     # compact-unwind only, and JIT'd registration is not available before
     # macOS 14.0.
     if platform.system() == "Darwin":
-
         assert "arm64" in config.host_triple or "x86_64" in config.host_triple
 
         if "x86_64" in config.host_triple:



More information about the llvm-branch-commits mailing list