[llvm] r188109 - [lit] Move ManyTests examples to lit/examples/many-tests.
Daniel Dunbar
daniel at zuster.org
Fri Aug 9 14:39:28 PDT 2013
Author: ddunbar
Date: Fri Aug 9 16:39:28 2013
New Revision: 188109
URL: http://llvm.org/viewvc/llvm-project?rev=188109&view=rev
Log:
[lit] Move ManyTests examples to lit/examples/many-tests.
Added:
llvm/trunk/utils/lit/examples/
llvm/trunk/utils/lit/examples/README.txt
llvm/trunk/utils/lit/examples/many-tests/
llvm/trunk/utils/lit/examples/many-tests/README.txt
llvm/trunk/utils/lit/examples/many-tests/lit.cfg
- copied, changed from r188108, llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg
Removed:
llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg
Added: llvm/trunk/utils/lit/examples/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/examples/README.txt?rev=188109&view=auto
==============================================================================
--- llvm/trunk/utils/lit/examples/README.txt (added)
+++ llvm/trunk/utils/lit/examples/README.txt Fri Aug 9 16:39:28 2013
@@ -0,0 +1,7 @@
+==============
+ lit Examples
+==============
+
+This directory contains examples of 'lit' test suite configurations. The test
+suites they define can be run with 'lit examples/example-name', for more details
+see the README in each example.
Added: llvm/trunk/utils/lit/examples/many-tests/README.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/examples/many-tests/README.txt?rev=188109&view=auto
==============================================================================
--- llvm/trunk/utils/lit/examples/many-tests/README.txt (added)
+++ llvm/trunk/utils/lit/examples/many-tests/README.txt Fri Aug 9 16:39:28 2013
@@ -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.
Copied: llvm/trunk/utils/lit/examples/many-tests/lit.cfg (from r188108, llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/examples/many-tests/lit.cfg?p2=llvm/trunk/utils/lit/examples/many-tests/lit.cfg&p1=llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg&r1=188108&r2=188109&rev=188109&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg (original)
+++ llvm/trunk/utils/lit/examples/many-tests/lit.cfg Fri Aug 9 16:39:28 2013
@@ -1,6 +1,6 @@
# -*- Python -*-
-Test = lit.Test
+from lit import Test
class ManyTests(object):
def __init__(self, N=10000):
Removed: llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg?rev=188108&view=auto
==============================================================================
--- llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg (original)
+++ llvm/trunk/utils/lit/lit/ExampleTests/ManyTests/lit.local.cfg (removed)
@@ -1,23 +0,0 @@
-# -*- Python -*-
-
-Test = lit.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()
More information about the llvm-commits
mailing list