lit: Add --repeat=N option, for running each test N times.
[oota-llvm.git] / utils / lit / Test.py
index d3f627456f8abd423cb9d9b7a619f3f601747cce..1f6556ba8595738f9485f49ce224f2e9fc59d18d 100644 (file)
@@ -54,6 +54,14 @@ class Test:
         self.output = None
         # The wall time to execute this test, if timing and once complete.
         self.elapsed = None
+        # The repeat index of this test, or None.
+        self.index = None
+
+    def copyWithIndex(self, index):
+        import copy
+        res = copy.copy(self)
+        res.index = index
+        return res
 
     def setResult(self, result, output, elapsed):
         assert self.result is None, "Test result already set!"