OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Client-side script to send a try job to the try server. It communicates to | 6 """Client-side script to send a try job to the try server. It communicates to |
7 the try server by either writting to a svn repository or by directly connecting | 7 the try server by either writting to a svn repository or by directly connecting |
8 to the server by HTTP. | 8 to the server by HTTP. |
9 """ | 9 """ |
10 | 10 |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 values.append(('issue', options.issue)) | 308 values.append(('issue', options.issue)) |
309 if options.patchset: | 309 if options.patchset: |
310 values.append(('patchset', options.patchset)) | 310 values.append(('patchset', options.patchset)) |
311 if options.target: | 311 if options.target: |
312 values.append(('target', options.target)) | 312 values.append(('target', options.target)) |
313 if options.project: | 313 if options.project: |
314 values.append(('project', options.project)) | 314 values.append(('project', options.project)) |
315 | 315 |
316 filters = ','.join(options.testfilter) | 316 filters = ','.join(options.testfilter) |
317 if filters: | 317 if filters: |
318 for bot in options.bot: | 318 for botlist in options.bot: |
319 if ':' in bot: | 319 for bot in botlist.split(','): |
320 raise ValueError( | 320 if ':' in bot: |
321 'Can\'t use both --testfilter and --bot builder:test formats ' | 321 raise ValueError( |
322 'at the same time') | 322 'Can\'t use both --testfilter and --bot builder:test formats ' |
323 else: | 323 'at the same time') |
324 values.append(('bot', '%s:%s' % (bot, filters))) | 324 else: |
| 325 values.append(('bot', '%s:%s' % (bot, filters))) |
325 else: | 326 else: |
326 for bot in options.bot: | 327 for bot in options.bot: |
327 values.append(('bot', bot)) | 328 values.append(('bot', bot)) |
328 return values | 329 return values |
329 | 330 |
330 | 331 |
331 def _SendChangeHTTP(options): | 332 def _SendChangeHTTP(options): |
332 """Send a change to the try server using the HTTP protocol.""" | 333 """Send a change to the try server using the HTTP protocol.""" |
333 if not options.host: | 334 if not options.host: |
334 raise NoTryServerAccess('Please use the --host option to specify the try ' | 335 raise NoTryServerAccess('Please use the --host option to specify the try ' |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 return 1 | 838 return 1 |
838 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 839 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
839 print >> sys.stderr, e | 840 print >> sys.stderr, e |
840 return 1 | 841 return 1 |
841 return 0 | 842 return 0 |
842 | 843 |
843 | 844 |
844 if __name__ == "__main__": | 845 if __name__ == "__main__": |
845 fix_encoding.fix_encoding() | 846 fix_encoding.fix_encoding() |
846 sys.exit(TryChange(None, None, False)) | 847 sys.exit(TryChange(None, None, False)) |
OLD | NEW |