Commit 9eef4f27 authored by maruel@chromium.org's avatar maruel@chromium.org

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
parent f46aed99
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment