20 lines · python
1from lit import Test2from lit.formats import TestFormat3 4 5class ManyTests(TestFormat):6 def __init__(self, N=10000):7 self.N = N8 9 def getTestsInDirectory(self, testSuite, path_in_suite, litConfig, localConfig):10 for i in range(self.N):11 test_name = "test-%04d" % (i,)12 yield Test.Test(testSuite, path_in_suite + (test_name,), localConfig)13 14 def execute(self, test, litConfig):15 # Do a "non-trivial" amount of Python work.16 sum = 017 for i in range(10000):18 sum += i19 return Test.PASS, ""20