diff options
| author | 2016-09-03 22:46:54 +0000 | |
|---|---|---|
| committer | 2016-09-03 22:46:54 +0000 | |
| commit | b5500b9ca0102f1ccaf32f0e77e96d0739aded9b (patch) | |
| tree | e1b7ebb5a0231f9e6d8d3f6f719582cebd64dc98 /gnu/llvm/utils/lit/examples/many-tests | |
| parent | clarify purpose of src/gnu/ directory. (diff) | |
| download | wireguard-openbsd-b5500b9ca0102f1ccaf32f0e77e96d0739aded9b.tar.xz wireguard-openbsd-b5500b9ca0102f1ccaf32f0e77e96d0739aded9b.zip | |
Use the space freed up by sparc and zaurus to import LLVM.
ok hackroom@
Diffstat (limited to 'gnu/llvm/utils/lit/examples/many-tests')
| -rw-r--r-- | gnu/llvm/utils/lit/examples/many-tests/README.txt | 10 | ||||
| -rw-r--r-- | gnu/llvm/utils/lit/examples/many-tests/lit.cfg | 23 |
2 files changed, 33 insertions, 0 deletions
diff --git a/gnu/llvm/utils/lit/examples/many-tests/README.txt b/gnu/llvm/utils/lit/examples/many-tests/README.txt new file mode 100644 index 00000000000..6bffff1468c --- /dev/null +++ b/gnu/llvm/utils/lit/examples/many-tests/README.txt @@ -0,0 +1,10 @@ +======================== + Many Tests lit Example +======================== + +This directory contains a trivial lit test suite configuration that defines a +custom test format which just generates a large (N=10000) number of tests that +do a small amount of work in the Python test execution code. + +This test suite is useful for testing the performance of lit on large numbers of +tests. diff --git a/gnu/llvm/utils/lit/examples/many-tests/lit.cfg b/gnu/llvm/utils/lit/examples/many-tests/lit.cfg new file mode 100644 index 00000000000..8f7b940b6ea --- /dev/null +++ b/gnu/llvm/utils/lit/examples/many-tests/lit.cfg @@ -0,0 +1,23 @@ +# -*- Python -*- + +from lit import Test + +class ManyTests(object): + def __init__(self, N=10000): + self.N = N + + def getTestsInDirectory(self, testSuite, path_in_suite, + litConfig, localConfig): + for i in range(self.N): + test_name = 'test-%04d' % (i,) + yield Test.Test(testSuite, path_in_suite + (test_name,), + localConfig) + + def execute(self, test, litConfig): + # Do a "non-trivial" amount of Python work. + sum = 0 + for i in range(10000): + sum += i + return Test.PASS,'' + +config.test_format = ManyTests() |
