Chromium Code Reviews| 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 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
| 7 | 7 |
| 8 """A git-command for integrating reviews on Rietveld and Gerrit.""" | 8 """A git-command for integrating reviews on Rietveld and Gerrit.""" |
| 9 | 9 |
| 10 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
| (...skipping 4380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4391 'infra', 'config', 'cq.cfg') | 4391 'infra', 'config', 'cq.cfg') |
| 4392 if os.path.exists(cq_cfg): | 4392 if os.path.exists(cq_cfg): |
| 4393 masters = {} | 4393 masters = {} |
| 4394 cq_masters = commit_queue.get_master_builder_map( | 4394 cq_masters = commit_queue.get_master_builder_map( |
| 4395 cq_cfg, include_experimental=False, include_triggered=False) | 4395 cq_cfg, include_experimental=False, include_triggered=False) |
| 4396 for master, builders in cq_masters.iteritems(): | 4396 for master, builders in cq_masters.iteritems(): |
| 4397 for builder in builders: | 4397 for builder in builders: |
| 4398 # Skip presubmit builders, because these will fail without LGTM. | 4398 # Skip presubmit builders, because these will fail without LGTM. |
| 4399 masters.setdefault(master, {})[builder] = ['defaulttests'] | 4399 masters.setdefault(master, {})[builder] = ['defaulttests'] |
| 4400 if masters: | 4400 if masters: |
| 4401 print('Loaded default bots from CQ config (%s)' % cq_cfg) | |
| 4401 return masters | 4402 return masters |
| 4403 else: | |
| 4404 print('CQ config exists (%s) but has no try bots listed' % cq_cfg) | |
|
Sergiy Byelozyorov
2016/06/07 14:58:14
It's not clear from the message what is used in th
| |
| 4402 | 4405 |
| 4403 if not options.bot: | 4406 if not options.bot: |
| 4404 parser.error('No default try builder to try, use --bot') | 4407 parser.error('No default try builder to try, use --bot') |
| 4405 | 4408 |
| 4406 builders_and_tests = {} | 4409 builders_and_tests = {} |
| 4407 # TODO(machenbach): The old style command-line options don't support | 4410 # TODO(machenbach): The old style command-line options don't support |
| 4408 # multiple try masters yet. | 4411 # multiple try masters yet. |
| 4409 old_style = filter(lambda x: isinstance(x, basestring), options.bot) | 4412 old_style = filter(lambda x: isinstance(x, basestring), options.bot) |
| 4410 new_style = filter(lambda x: isinstance(x, tuple), options.bot) | 4413 new_style = filter(lambda x: isinstance(x, tuple), options.bot) |
| 4411 | 4414 |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4935 if __name__ == '__main__': | 4938 if __name__ == '__main__': |
| 4936 # These affect sys.stdout so do it outside of main() to simplify mocks in | 4939 # These affect sys.stdout so do it outside of main() to simplify mocks in |
| 4937 # unit testing. | 4940 # unit testing. |
| 4938 fix_encoding.fix_encoding() | 4941 fix_encoding.fix_encoding() |
| 4939 setup_color.init() | 4942 setup_color.init() |
| 4940 try: | 4943 try: |
| 4941 sys.exit(main(sys.argv[1:])) | 4944 sys.exit(main(sys.argv[1:])) |
| 4942 except KeyboardInterrupt: | 4945 except KeyboardInterrupt: |
| 4943 sys.stderr.write('interrupted\n') | 4946 sys.stderr.write('interrupted\n') |
| 4944 sys.exit(1) | 4947 sys.exit(1) |
| OLD | NEW |