lit: Allow test_format to be None.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 5 May 2010 17:22:35 +0000 (17:22 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 5 May 2010 17:22:35 +0000 (17:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103091 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/lit/lit.py

index a29fa42101cc68137690f2a4880696c5248e3d2f..3de1084e6aa973eda805b8981c44d987ce7374ea 100755 (executable)
@@ -258,9 +258,10 @@ def getTestsInSuite(ts, path_in_suite, litConfig,
     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
+    if lc.test_format is not None:
+        for res in lc.test_format.getTestsInDirectory(ts, path_in_suite,
+                                                      litConfig, lc):
+            yield res
 
     # Search subdirectories.
     for filename in os.listdir(source_path):