[PATCH] D96594: [lit] Add "slowest_tests" config option

David Zarzycki via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 05:00:26 PST 2021


davezarzycki created this revision.
davezarzycki added reviewers: chandlerc, gparker42, ddunbar, homerdin, yln, delcypher, jdenny, rnk, compnerd.
davezarzycki added a project: LLVM.
davezarzycki requested review of this revision.

With enough cores, the slowest tests can significantly change the total testing time if they happen to run late. With this change, a test suite can improve performance (for high-end systems) by listing just a few of the slowest tests up front.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96594

Files:
  llvm/utils/lit/lit/Test.py
  llvm/utils/lit/lit/TestingConfig.py


Index: llvm/utils/lit/lit/TestingConfig.py
===================================================================
--- llvm/utils/lit/lit/TestingConfig.py
+++ llvm/utils/lit/lit/TestingConfig.py
@@ -124,6 +124,8 @@
         self.limit_to_features = set(limit_to_features)
         # Whether the suite should be tested early in a given run.
         self.is_early = bool(is_early)
+        # List of slowest tests (to run early)
+        self.slowest_tests = {}
         self.parallelism_group = parallelism_group
         self._recursiveExpansionLimit = None
 
Index: llvm/utils/lit/lit/Test.py
===================================================================
--- llvm/utils/lit/lit/Test.py
+++ llvm/utils/lit/lit/Test.py
@@ -404,4 +404,6 @@
         This can be used for test suites with long running tests to maximize
         parallelism or where it is desirable to surface their failures early.
         """
+        if '/'.join(self.path_in_suite) in self.suite.config.slowest_tests:
+            return True
         return self.suite.config.is_early


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96594.323291.patch
Type: text/x-patch
Size: 1056 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210212/ffe4367f/attachment-0001.bin>


More information about the llvm-commits mailing list