summaryrefslogtreecommitdiff
path: root/utils/lit/lit.py
diff options
context:
space:
mode:
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