[clang] [llvm] Repeat Clang Interpreter lit tests 100 times (PR #230864)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 10 15:01:30 PDT 2026
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/230864
None
>From a7a311ebfb57d146720cf7c50b1a535775d438c7 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Sat, 10 Oct 2026 15:01:18 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
=?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Created using spr 1.3.7
---
clang/test/Interpreter/lit.local.cfg | 2 ++
llvm/utils/lit/lit/Test.py | 2 ++
llvm/utils/lit/lit/formats/base.py | 11 ++++++++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/clang/test/Interpreter/lit.local.cfg b/clang/test/Interpreter/lit.local.cfg
index fa4e608deb6e3..1987cc1a34b8f 100644
--- a/clang/test/Interpreter/lit.local.cfg
+++ b/clang/test/Interpreter/lit.local.cfg
@@ -12,3 +12,5 @@ if "host-supports-jit" not in config.available_features or \
# that lit already set up.
config.substitutions.append(
('%ld_library_path', config.environment.get('LD_LIBRARY_PATH', '')))
+
+config.repeat_tests = 10000
diff --git a/llvm/utils/lit/lit/Test.py b/llvm/utils/lit/lit/Test.py
index 35da7afc591c0..13464f7a12483 100644
--- a/llvm/utils/lit/lit/Test.py
+++ b/llvm/utils/lit/lit/Test.py
@@ -331,6 +331,8 @@ def getFilePath(self):
return self.getSourcePath()
def getSourcePath(self):
+ if self.file_path and self.gtest_json_file is None:
+ return self.file_path
return self.suite.getSourcePath(self.path_in_suite)
def getExecPath(self):
diff --git a/llvm/utils/lit/lit/formats/base.py b/llvm/utils/lit/lit/formats/base.py
index 6e53613e7d1cb..d4c410e3691ca 100644
--- a/llvm/utils/lit/lit/formats/base.py
+++ b/llvm/utils/lit/lit/formats/base.py
@@ -34,7 +34,16 @@ def getTestsForPath(self, testSuite, path_in_suite, litConfig, localConfig):
return
if any(filename.endswith(suffix) for suffix in localConfig.suffixes):
- yield lit.Test.Test(testSuite, path_in_suite, localConfig)
+ source_path = testSuite.getSourcePath(path_in_suite)
+ for i in range(getattr(localConfig, "repeat_tests", 1)):
+ yield lit.Test.Test(
+ testSuite,
+ path_in_suite
+ if i == 0
+ else path_in_suite[:-1] + (f"{i}_{filename}",),
+ localConfig,
+ file_path=source_path,
+ )
def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig):
source_path = testSuite.getSourcePath(path_in_suite)
More information about the llvm-commits
mailing list