Fix support for --bot bot1,bot2 -t foo

Previously, it would apply the test filter only on the last bot.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/9634011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@125622 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
maruel@chromium.org 14 years ago
parent f46aed992a
commit 9eef4f27d0

@ -62,9 +62,8 @@ class TryChangeSimpleTest(unittest.TestCase):
# Doesn't require supermox to run.
def test_flags(self):
cmd = [
'--bot', 'bot1',
'--bot', 'bot1,bot2',
'--testfilter', 'test1',
'--bot', 'bot2',
'--testfilter', 'test2',
'--user', 'joe',
'--email', 'joe@example.com',

@ -315,13 +315,14 @@ def _ParseSendChangeOptions(options):
filters = ','.join(options.testfilter)
if filters:
for bot in options.bot:
if ':' in bot:
raise ValueError(
'Can\'t use both --testfilter and --bot builder:test formats '
'at the same time')
else:
values.append(('bot', '%s:%s' % (bot, filters)))
for botlist in options.bot:
for bot in botlist.split(','):
if ':' in bot:
raise ValueError(
'Can\'t use both --testfilter and --bot builder:test formats '
'at the same time')
else:
values.append(('bot', '%s:%s' % (bot, filters)))
else:
for bot in options.bot:
values.append(('bot', bot))

Loading…
Cancel
Save