[clang] [llvm] Repeat Clang Interpreter lit tests 100 times (PR #230864)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 10 15:02:07 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-testing-tools
Author: Vitaly Buka (vitalybuka)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/230864.diff
3 Files Affected:
- (modified) clang/test/Interpreter/lit.local.cfg (+2)
- (modified) llvm/utils/lit/lit/Test.py (+2)
- (modified) llvm/utils/lit/lit/formats/base.py (+10-1)
``````````diff
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)
``````````
</details>
https://github.com/llvm/llvm-project/pull/230864
More information about the cfe-commits
mailing list