[llvm-branch-commits] [llvm] [lit] Move maxIndividualTestTime from global to test suite config (PR #198192)

Aiden Grossman via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 21 06:10:52 PDT 2026


================
@@ -247,6 +250,19 @@ def finish(self, litConfig):
             and getattr(self, "test_retry_attempts", None) is None
         ):
             self.test_retry_attempts = litConfig.maxRetriesPerTest
+        # Global config is from LIT_OPTS and must override site-specific settings.
+        if litConfig.maxIndividualTestTime is not None:
+            suite_timeout = self.maxIndividualTestTime
+            if suite_timeout > 0 and suite_timeout != litConfig.maxIndividualTestTime:
+                litConfig.note(
+                    (
+                        "The test suite {0!r} configuration requested an individual"
+                        " test timeout of {1} seconds but a timeout of {2} seconds was"
+                        " requested on the command line. Forcing timeout to be {2}"
+                        " seconds."
+                    ).format(self.name, suite_timeout, litConfig.maxIndividualTestTime)
+                )
+            self.maxIndividualTestTime = litConfig.maxIndividualTestTime
----------------
boomanaiden154 wrote:

This looks like it needs to be indented one more level?

https://github.com/llvm/llvm-project/pull/198192


More information about the llvm-branch-commits mailing list