diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-14 02:38:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-14 02:38:46 +0000 |
commit | 54ec232c605ae89b0fff7b144e893f89c0282529 (patch) | |
tree | 7e8e44e98d8b5bcb5ec19ace53da4fc5129c0ab9 /llvm/utils/lit/lit.py | |
parent | a22585ada99120d12d659ed6ecfc112231276130 (diff) | |
download | llvm-54ec232c605ae89b0fff7b144e893f89c0282529.zip llvm-54ec232c605ae89b0fff7b144e893f89c0282529.tar.gz llvm-54ec232c605ae89b0fff7b144e893f89c0282529.tar.bz2 |
lit: Give test formats control over test discovery.
llvm-svn: 81751
Diffstat (limited to 'llvm/utils/lit/lit.py')
-rwxr-xr-x | llvm/utils/lit/lit.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/utils/lit/lit.py b/llvm/utils/lit/lit.py index 98cb44d..bc43c50 100755 --- a/llvm/utils/lit/lit.py +++ b/llvm/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 |