| 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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 options.bot = presubmit_support.DoGetTrySlaves( | 798 options.bot = presubmit_support.DoGetTrySlaves( |
| 799 change, | 799 change, |
| 800 checkouts[0].GetFileNames(), | 800 checkouts[0].GetFileNames(), |
| 801 checkouts[0].checkout_root, | 801 checkouts[0].checkout_root, |
| 802 root_presubmit, | 802 root_presubmit, |
| 803 options.project, | 803 options.project, |
| 804 False, | 804 False, |
| 805 sys.stdout) | 805 sys.stdout) |
| 806 except ImportError: | 806 except ImportError: |
| 807 pass | 807 pass |
| 808 if options.testfilter: |
| 809 bots = set() |
| 810 for bot in options.bot: |
| 811 assert ',' not in bot |
| 812 if bot.endswith(':compile'): |
| 813 # Skip over compile-only builders for now. |
| 814 continue |
| 815 bots.add(bot.split(':', 1)[0]) |
| 816 options.bot = list(bots) |
| 817 |
| 808 # If no bot is specified, either the default pool will be selected or the | 818 # If no bot is specified, either the default pool will be selected or the |
| 809 # try server will refuse the job. Either case we don't need to interfere. | 819 # try server will refuse the job. Either case we don't need to interfere. |
| 810 | 820 |
| 811 if options.print_bots: | 821 if options.print_bots: |
| 812 print 'Bots which would be used:' | 822 print 'Bots which would be used:' |
| 813 for bot in options.bot: | 823 for bot in options.bot: |
| 814 print ' %s' % bot | 824 print ' %s' % bot |
| 815 return 0 | 825 return 0 |
| 816 | 826 |
| 817 # Send the patch. | 827 # Send the patch. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 838 return 1 | 848 return 1 |
| 839 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 849 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 840 print >> sys.stderr, e | 850 print >> sys.stderr, e |
| 841 return 1 | 851 return 1 |
| 842 return 0 | 852 return 0 |
| 843 | 853 |
| 844 | 854 |
| 845 if __name__ == "__main__": | 855 if __name__ == "__main__": |
| 846 fix_encoding.fix_encoding() | 856 fix_encoding.fix_encoding() |
| 847 sys.exit(TryChange(None, None, False)) | 857 sys.exit(TryChange(None, None, False)) |
| OLD | NEW |