summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/utils/lit/lit/formats/googletest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/utils/lit/lit/formats/googletest.py b/llvm/utils/lit/lit/formats/googletest.py
index b683f7c7db8..9c55e71d233 100644
--- a/llvm/utils/lit/lit/formats/googletest.py
+++ b/llvm/utils/lit/lit/formats/googletest.py
@@ -78,7 +78,10 @@ class GoogleTest(TestFormat):
litConfig, localConfig):
source_path = testSuite.getSourcePath(path_in_suite)
for subdir in self.test_sub_dirs:
- for fn in lit.util.listdir_files(os.path.join(source_path, subdir),
+ dir_path = os.path.join(source_path, subdir)
+ if not os.path.isdir(dir_path):
+ continue
+ for fn in lit.util.listdir_files(dir_path,
suffixes={self.test_suffix}):
# Discover the tests in this executable.
execpath = os.path.join(source_path, subdir, fn)
OpenPOWER on IntegriCloud