Add support for new-style trybot specifications to git_cl.py.
BUG=278554
Review URL: https://codereview.chromium.org/106763010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@241629 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index 4ef4c46..d01c354 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2097,7 +2097,10 @@
parser.error('No default try builder to try, use --bot')
builders_and_tests = {}
- for bot in options.bot:
+ old_style = filter(lambda x: isinstance(x, basestring), options.bot)
+ new_style = filter(lambda x: isinstance(x, tuple), options.bot)
+
+ for bot in old_style:
if ':' in bot:
builder, tests = bot.split(':', 1)
builders_and_tests.setdefault(builder, []).extend(tests.split(','))
@@ -2106,6 +2109,9 @@
else:
builders_and_tests.setdefault(bot, []).append('defaulttests')
+ for bot, tests in new_style:
+ builders_and_tests.setdefault(bot, []).extend(tests)
+
if options.testfilter:
forced_tests = sum((t.split(',') for t in options.testfilter), [])
builders_and_tests = dict(