aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-10 21:00:55 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-10 21:00:55 +0000
commitcacaa5bff2d1d57d9e547aa084f67a7bcee44003 (patch)
tree05244a2dd3793bc766b9a7213ff803a00f1299ff
parentbef529182f3931f4d13e885d91a0beb7aa81ced2 (diff)
lit: Ignore dot files when scanning for tests (e.g., editor temprary files,
etc.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95803 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/lit/lit/TestFormats.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/utils/lit/lit/TestFormats.py b/utils/lit/lit/TestFormats.py
index fba0ce2ce4..d87a467559 100644
--- a/utils/lit/lit/TestFormats.py
+++ b/utils/lit/lit/TestFormats.py
@@ -87,6 +87,10 @@ class FileBasedTest(object):
litConfig, localConfig):
source_path = testSuite.getSourcePath(path_in_suite)
for filename in os.listdir(source_path):
+ # Ignore dot files.
+ if filename.startswith('.'):
+ continue
+
filepath = os.path.join(source_path, filename)
if not os.path.isdir(filepath):
base,ext = os.path.splitext(filename)
@@ -137,7 +141,8 @@ class OneCommandPerFileTest:
d not in localConfig.excludes)]
for filename in filenames:
- if (not self.pattern.match(filename) or
+ if (filename.startswith('.') or
+ not self.pattern.match(filename) or
filename in localConfig.excludes):
continue