From 43064fd5bf31ab943088c296369b490585196457 Mon Sep 17 00:00:00 2001 From: "stip@chromium.org" Date: Wed, 18 Dec 2013 20:07:44 +0000 Subject: [PATCH] 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 --- git_cl.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index 4ef4c4630a..d01c354169 100755 --- a/git_cl.py +++ b/git_cl.py @@ -2097,7 +2097,10 @@ def CMDtry(parser, args): 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 @@ def CMDtry(parser, args): 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(