[Lldb-commits] [PATCH] D13588: dotest.py: Fail if we detect multiple tests with the same name
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 9 05:50:07 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249828: dotest.py: Fail if we detect multiple tests with the same name (authored by labath).
Changed prior to commit:
http://reviews.llvm.org/D13588?vs=36939&id=36941#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13588
Files:
lldb/trunk/test/dotest.py
Index: lldb/trunk/test/dotest.py
===================================================================
--- lldb/trunk/test/dotest.py
+++ lldb/trunk/test/dotest.py
@@ -265,6 +265,9 @@
results_formatter_object = None
results_formatter_options = None
+# The names of all tests. Used to assert we don't have two tests with the same base name.
+all_tests = set()
+
def usage(parser):
parser.print_help()
if verbose > 0:
@@ -1288,6 +1291,7 @@
global filters
global fs4all
global excluded
+ global all_tests
if set(dir.split(os.sep)).intersection(excluded):
#print "Detected an excluded dir component: %s" % dir
@@ -1298,6 +1302,11 @@
continue
if '.py' == os.path.splitext(name)[1] and name.startswith(prefix):
+
+ if name in all_tests:
+ raise Exception("Found multiple tests with the name %s" % name)
+ all_tests.add(name)
+
# Try to match the regexp pattern, if specified.
if regexp:
import re
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13588.36941.patch
Type: text/x-patch
Size: 1041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151009/9755238b/attachment.bin>
More information about the lldb-commits
mailing list