summaryrefslogtreecommitdiff
path: root/utils/lit/lit.py
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-14 02:38:46 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-14 02:38:46 +0000
commit00a42449ecd9aa243d844ffd1e473fd88fe1a2b1 (patch)
tree17b44010437ffca31b69f7840ede82caef1ccbb9 /utils/lit/lit.py
parentaf7263d51edaf55f56808fd7796d1a910aac46ee (diff)
downloadllvm-00a42449ecd9aa243d844ffd1e473fd88fe1a2b1.tar.gz
llvm-00a42449ecd9aa243d844ffd1e473fd88fe1a2b1.tar.bz2
llvm-00a42449ecd9aa243d844ffd1e473fd88fe1a2b1.tar.xz
lit: Give test formats control over test discovery.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit/lit.py')
-rwxr-xr-xutils/lit/lit.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/utils/lit/lit.py b/utils/lit/lit.py
index 98cb44d17d..bc43c50574 100755
--- a/utils/lit/lit.py
+++ b/utils/lit/lit.py
@@ -252,6 +252,13 @@ def getTestsInSuite(ts, path_in_suite, litConfig,
# Otherwise we have a directory to search for tests, start by getting the
# local configuration.
lc = getLocalConfig(ts, path_in_suite, litConfig, localConfigCache)
+
+ # Search for tests.
+ for res in lc.test_format.getTestsInDirectory(ts, path_in_suite,
+ litConfig, lc):
+ yield res
+
+ # Search subdirectories.
for filename in os.listdir(source_path):
# FIXME: This doesn't belong here?
if filename == 'Output' or filename in lc.excludes:
@@ -270,11 +277,6 @@ def getTestsInSuite(ts, path_in_suite, litConfig,
litConfig, testSuiteCache,
localConfigCache):
yield res
- else:
- # Otherwise add tests for matching suffixes.
- base,ext = os.path.splitext(filename)
- if ext in lc.suffixes:
- yield Test.Test(ts, path_in_suite + (filename,), lc)
def runTests(numThreads, litConfig, provider, display):
# If only using one testing thread, don't use threads at all; this lets us