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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 if not change: | 369 if not change: |
370 if not changed_files: | 370 if not changed_files: |
371 changed_files = checkouts[0].file_tuples | 371 changed_files = checkouts[0].file_tuples |
372 change = presubmit_support.Change(options.name, | 372 change = presubmit_support.Change(options.name, |
373 '', | 373 '', |
374 checkouts[0].checkout_root, | 374 checkouts[0].checkout_root, |
375 changed_files, | 375 changed_files, |
376 options.issue, | 376 options.issue, |
377 options.patchset, | 377 options.patchset, |
378 options.email) | 378 options.email) |
379 trybots = presubmit_support.DoGetTrySlaves( | 379 trybots = presubmit_support.DoGetTryMasters( |
380 change, | 380 change, |
381 checkouts[0].GetFileNames(), | 381 checkouts[0].GetFileNames(), |
382 checkouts[0].checkout_root, | 382 checkouts[0].checkout_root, |
383 root_presubmit, | 383 root_presubmit, |
384 options.project, | 384 options.project, |
385 options.verbose, | 385 options.verbose, |
386 sys.stdout) | 386 sys.stdout).get('tryserver.chromium', []) |
387 if trybots: | 387 if trybots: |
388 old_style = filter(lambda x: isinstance(x, basestring), trybots) | 388 old_style = filter(lambda x: isinstance(x, basestring), trybots) |
389 new_style = filter(lambda x: isinstance(x, tuple), trybots) | 389 new_style = filter(lambda x: isinstance(x, tuple), trybots) |
390 | 390 |
391 # _ParseBotList's testfilter is set to None otherwise it will complain. | 391 # _ParseBotList's testfilter is set to None otherwise it will complain. |
392 bot_spec = _ApplyTestFilter(options.testfilter, | 392 bot_spec = _ApplyTestFilter(options.testfilter, |
393 _ParseBotList(old_style, None)) | 393 _ParseBotList(old_style, None)) |
394 | 394 |
395 bot_spec.extend(_ApplyTestFilter(options.testfilter, new_style)) | 395 bot_spec.extend(_ApplyTestFilter(options.testfilter, new_style)) |
396 | 396 |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 return 1 | 928 return 1 |
929 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 929 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
930 print >> sys.stderr, e | 930 print >> sys.stderr, e |
931 return 1 | 931 return 1 |
932 return 0 | 932 return 0 |
933 | 933 |
934 | 934 |
935 if __name__ == "__main__": | 935 if __name__ == "__main__": |
936 fix_encoding.fix_encoding() | 936 fix_encoding.fix_encoding() |
937 sys.exit(TryChange(None, None, False)) | 937 sys.exit(TryChange(None, None, False)) |
OLD | NEW |