summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-05-07 00:36:28 +0000
committerEnrico Granata <egranata@apple.com>2013-05-07 00:36:28 +0000
commite5cc5cd5ac8c583ec6c37cead41b550c3b2fedb2 (patch)
tree61cb03e90e907537c9130f18750ee6c3440e6d45
parent75ed350132cb08094c8c30981c276fbd13080f74 (diff)
downloadbcm5719-llvm-e5cc5cd5ac8c583ec6c37cead41b550c3b2fedb2.tar.gz
bcm5719-llvm-e5cc5cd5ac8c583ec6c37cead41b550c3b2fedb2.zip
Making it possible to specify a substring for a category name as long as the match is unique
llvm-svn: 181281
-rwxr-xr-xlldb/test/dotest.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/lldb/test/dotest.py b/lldb/test/dotest.py
index 8e8a2f26a0e..40445513f69 100755
--- a/lldb/test/dotest.py
+++ b/lldb/test/dotest.py
@@ -318,6 +318,15 @@ o GDB_REMOTE_LOG: if defined, specifies the log file pathname for the
sys.exit(0)
+def unique_string_match(yourentry,list):
+ candidate = None
+ for item in list:
+ if item.startswith(yourentry):
+ if candidate:
+ return None
+ candidate = item
+ return candidate
+
def parseOptionsAndInitTestdirs():
"""Initialize the list of directories containing our unittest scripts.
@@ -459,13 +468,18 @@ def parseOptionsAndInitTestdirs():
archs = [platform_machine]
if args.categoriesList:
+ finalCategoriesList = []
for category in args.categoriesList:
+ origCategory = category
if not(category in validCategories):
- print "fatal error: category '" + category + "' is not a valid category"
+ category = unique_string_match(category,validCategories)
+ if not(category in validCategories) or category == None:
+ print "fatal error: category '" + origCategory + "' is not a valid category"
print "if you have added a new category, please edit dotest.py, adding your new category to validCategories"
print "else, please specify one or more of the following: " + str(validCategories.keys())
sys.exit(1)
- categoriesList = set(args.categoriesList)
+ finalCategoriesList.append(category)
+ categoriesList = set(finalCategoriesList)
useCategories = True
else:
categoriesList = []
OpenPOWER on IntegriCloud