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 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 | 1565 |
1566 def GetPreferredTryMasters(project, change): | 1566 def GetPreferredTryMasters(project, change): |
1567 files = change.LocalPaths() | 1567 files = change.LocalPaths() |
1568 | 1568 |
1569 if not files or all(re.search(r'[\\/]OWNERS$', f) for f in files): | 1569 if not files or all(re.search(r'[\\/]OWNERS$', f) for f in files): |
1570 return {} | 1570 return {} |
1571 | 1571 |
1572 if all(re.search('\.(m|mm)$|(^|[/_])mac[/_.]', f) for f in files): | 1572 if all(re.search('\.(m|mm)$|(^|[/_])mac[/_.]', f) for f in files): |
1573 return GetDefaultTryConfigs([ | 1573 return GetDefaultTryConfigs([ |
1574 'mac_chromium_compile_dbg', | 1574 'mac_chromium_compile_dbg', |
1575 'mac_chromium_rel', | 1575 'mac_chromium_rel_swarming', |
1576 ]) | 1576 ]) |
1577 if all(re.search('(^|[/_])win[/_.]', f) for f in files): | 1577 if all(re.search('(^|[/_])win[/_.]', f) for f in files): |
1578 return GetDefaultTryConfigs(['win_chromium_dbg', 'win_chromium_rel']) | 1578 return GetDefaultTryConfigs(['win_chromium_dbg', 'win_chromium_rel']) |
1579 if all(re.search('(^|[/_])android[/_.]', f) for f in files): | 1579 if all(re.search('(^|[/_])android[/_.]', f) for f in files): |
1580 return GetDefaultTryConfigs([ | 1580 return GetDefaultTryConfigs([ |
1581 'android_aosp', | 1581 'android_aosp', |
1582 'android_clang_dbg', | 1582 'android_clang_dbg', |
1583 'android_dbg', | 1583 'android_dbg', |
1584 ]) | 1584 ]) |
1585 if all(re.search('[/_]ios[/_.]', f) for f in files): | 1585 if all(re.search('[/_]ios[/_.]', f) for f in files): |
1586 return GetDefaultTryConfigs(['ios_rel_device', 'ios_dbg_simulator']) | 1586 return GetDefaultTryConfigs(['ios_rel_device', 'ios_dbg_simulator']) |
1587 | 1587 |
1588 builders = [ | 1588 builders = [ |
1589 'android_chromium_gn_compile_rel', | 1589 'android_chromium_gn_compile_rel', |
1590 'android_clang_dbg', | 1590 'android_clang_dbg', |
1591 'android_dbg', | 1591 'android_dbg', |
1592 'ios_dbg_simulator', | 1592 'ios_dbg_simulator', |
1593 'ios_rel_device', | 1593 'ios_rel_device', |
1594 'linux_chromium_chromeos_rel', | 1594 'linux_chromium_chromeos_rel_swarming', |
1595 'linux_chromium_clang_dbg', | 1595 'linux_chromium_clang_dbg', |
1596 'linux_chromium_gn_rel', | 1596 'linux_chromium_gn_rel', |
1597 'linux_chromium_rel_swarming', | 1597 'linux_chromium_rel_swarming', |
1598 'linux_gpu', | 1598 'linux_gpu', |
1599 'mac_chromium_compile_dbg', | 1599 'mac_chromium_compile_dbg', |
1600 'mac_chromium_rel', | 1600 'mac_chromium_rel_swarming', |
1601 'mac_gpu', | 1601 'mac_gpu', |
1602 'win_chromium_compile_dbg', | 1602 'win_chromium_compile_dbg', |
1603 'win_chromium_rel', | 1603 'win_chromium_rel', |
1604 'win_chromium_x64_rel', | 1604 'win_chromium_x64_rel', |
1605 'win_gpu', | 1605 'win_gpu', |
1606 ] | 1606 ] |
1607 | 1607 |
1608 # Match things like path/aura/file.cc and path/file_aura.cc. | 1608 # Match things like path/aura/file.cc and path/file_aura.cc. |
1609 # Same for chromeos. | 1609 # Same for chromeos. |
1610 if any(re.search('[/_](aura|chromeos)', f) for f in files): | 1610 if any(re.search('[/_](aura|chromeos)', f) for f in files): |
(...skipping 11 matching lines...) Expand all Loading... |
1622 builders.extend(['cros_x86']) | 1622 builders.extend(['cros_x86']) |
1623 | 1623 |
1624 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it | 1624 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it |
1625 # unless they're .gyp(i) files as changes to those files can break the gyp | 1625 # unless they're .gyp(i) files as changes to those files can break the gyp |
1626 # step on that bot. | 1626 # step on that bot. |
1627 if (not all(re.search('^chrome', f) for f in files) or | 1627 if (not all(re.search('^chrome', f) for f in files) or |
1628 any(re.search('\.gypi?$', f) for f in files)): | 1628 any(re.search('\.gypi?$', f) for f in files)): |
1629 builders.extend(['android_aosp']) | 1629 builders.extend(['android_aosp']) |
1630 | 1630 |
1631 return GetDefaultTryConfigs(builders) | 1631 return GetDefaultTryConfigs(builders) |
OLD | NEW |