| 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 depot_tools. | 8 for more details about the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1758 'win_chromium_rel_ng', | 1758 'win_chromium_rel_ng', |
| 1759 'win_chromium_x64_rel_ng', | 1759 'win_chromium_x64_rel_ng', |
| 1760 ]) | 1760 ]) |
| 1761 if all(re.search(r'(^|[\\\/_])android[\\\/_.]', f) and | 1761 if all(re.search(r'(^|[\\\/_])android[\\\/_.]', f) and |
| 1762 not re.search(r'(^|[\\\/_])devtools[\\\/_.]', f) for f in files): | 1762 not re.search(r'(^|[\\\/_])devtools[\\\/_.]', f) for f in files): |
| 1763 return GetDefaultTryConfigs([ | 1763 return GetDefaultTryConfigs([ |
| 1764 'android_aosp', | 1764 'android_aosp', |
| 1765 'android_rel_tests_recipe', | 1765 'android_rel_tests_recipe', |
| 1766 ]) | 1766 ]) |
| 1767 if all(re.search(r'[\\\/_]ios[\\\/_.]', f) for f in files): | 1767 if all(re.search(r'[\\\/_]ios[\\\/_.]', f) for f in files): |
| 1768 return GetDefaultTryConfigs(['ios_rel_device', 'ios_dbg_simulator']) | 1768 return GetDefaultTryConfigs([ |
| 1769 'ios_rel_device_ninja', |
| 1770 'ios_dbg_simulator_ninja', |
| 1771 ]) |
| 1769 | 1772 |
| 1770 import os | 1773 import os |
| 1771 import json | 1774 import json |
| 1772 with open(os.path.join( | 1775 with open(os.path.join( |
| 1773 change.RepositoryRoot(), 'testing', 'commit_queue', 'config.json')) as f: | 1776 change.RepositoryRoot(), 'testing', 'commit_queue', 'config.json')) as f: |
| 1774 cq_config = json.load(f) | 1777 cq_config = json.load(f) |
| 1775 cq_trybots = cq_config.get('trybots', {}) | 1778 cq_trybots = cq_config.get('trybots', {}) |
| 1776 builders = cq_trybots.get('launched', {}) | 1779 builders = cq_trybots.get('launched', {}) |
| 1777 for master, master_config in cq_trybots.get('triggered', {}).iteritems(): | 1780 for master, master_config in cq_trybots.get('triggered', {}).iteritems(): |
| 1778 for triggered_bot in master_config: | 1781 for triggered_bot in master_config: |
| 1779 builders.get(master, {}).pop(triggered_bot, None) | 1782 builders.get(master, {}).pop(triggered_bot, None) |
| 1780 | 1783 |
| 1781 # Explicitly iterate over copies of dicts since we mutate them. | 1784 # Explicitly iterate over copies of dicts since we mutate them. |
| 1782 for master in builders.keys(): | 1785 for master in builders.keys(): |
| 1783 for builder in builders[master].keys(): | 1786 for builder in builders[master].keys(): |
| 1784 # Do not trigger presubmit builders, since they're likely to fail | 1787 # Do not trigger presubmit builders, since they're likely to fail |
| 1785 # (e.g. OWNERS checks before finished code review), and we're | 1788 # (e.g. OWNERS checks before finished code review), and we're |
| 1786 # running local presubmit anyway. | 1789 # running local presubmit anyway. |
| 1787 if 'presubmit' in builder: | 1790 if 'presubmit' in builder: |
| 1788 builders[master].pop(builder) | 1791 builders[master].pop(builder) |
| 1789 | 1792 |
| 1790 # Match things like path/aura/file.cc and path/file_aura.cc. | 1793 # Match things like path/aura/file.cc and path/file_aura.cc. |
| 1791 # Same for chromeos. | 1794 # Same for chromeos. |
| 1792 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): | 1795 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): |
| 1793 tryserver_linux = builders.setdefault('tryserver.chromium.linux', {}) | 1796 tryserver_linux = builders.setdefault('tryserver.chromium.linux', {}) |
| 1794 tryserver_linux['linux_chromium_chromeos_asan_rel_ng'] = ['defaulttests'] | 1797 tryserver_linux['linux_chromium_chromeos_asan_rel_ng'] = ['defaulttests'] |
| 1795 | 1798 |
| 1796 return builders | 1799 return builders |
| OLD | NEW |