Debian Codegraph @

llvm/utils/lit/examples/many-tests/ManyTests.py

raw
1 from lit import Test
2 from lit.formats import TestFormat
3
4
5 class ManyTests(TestFormat):
6 def __init__(self, N=10000):
7 self.N = N
8
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 = 0
17 for i in range(10000):
18 sum += i
19 return Test.PASS, ""