OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Top-level presubmit script for Chromium. | 5 """Top-level presubmit script for Chromium. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
9 """ | 9 """ |
10 | 10 |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 import json | 1676 import json |
1677 with open(os.path.join( | 1677 with open(os.path.join( |
1678 change.RepositoryRoot(), 'testing', 'commit_queue', 'config.json')) as f: | 1678 change.RepositoryRoot(), 'testing', 'commit_queue', 'config.json')) as f: |
1679 cq_config = json.load(f) | 1679 cq_config = json.load(f) |
1680 cq_trybots = cq_config.get('trybots', {}) | 1680 cq_trybots = cq_config.get('trybots', {}) |
1681 builders = cq_trybots.get('launched', {}) | 1681 builders = cq_trybots.get('launched', {}) |
1682 for master, master_config in cq_trybots.get('triggered', {}).iteritems(): | 1682 for master, master_config in cq_trybots.get('triggered', {}).iteritems(): |
1683 for triggered_bot in master_config: | 1683 for triggered_bot in master_config: |
1684 builders.get(master, {}).pop(triggered_bot, None) | 1684 builders.get(master, {}).pop(triggered_bot, None) |
1685 | 1685 |
| 1686 # Explicitly iterate over copies of dicts since we mutate them. |
| 1687 for master in builders.keys(): |
| 1688 for builder in builders[master].keys(): |
| 1689 # Do not trigger presubmit builders, since they're likely to fail |
| 1690 # (e.g. OWNERS checks before finished code review), and we're |
| 1691 # running local presubmit anyway. |
| 1692 if 'presubmit' in builder: |
| 1693 builders[master].pop(builder) |
| 1694 |
1686 # Match things like path/aura/file.cc and path/file_aura.cc. | 1695 # Match things like path/aura/file.cc and path/file_aura.cc. |
1687 # Same for chromeos. | 1696 # Same for chromeos. |
1688 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): | 1697 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): |
1689 tryserver_linux = builders.setdefault('tryserver.chromium.linux', {}) | 1698 tryserver_linux = builders.setdefault('tryserver.chromium.linux', {}) |
1690 tryserver_linux['linux_chromium_chromeos_asan_rel_ng'] = ['defaulttests'] | 1699 tryserver_linux['linux_chromium_chromeos_asan_rel_ng'] = ['defaulttests'] |
1691 | 1700 |
1692 return builders | 1701 return builders |
OLD | NEW |