| 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 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2050 | 2050 |
| 2051 def GetTryServerMasterForBot(bot): | 2051 def GetTryServerMasterForBot(bot): |
| 2052 """Returns the Try Server master for the given bot. | 2052 """Returns the Try Server master for the given bot. |
| 2053 | 2053 |
| 2054 It tries to guess the master from the bot name, but may still fail | 2054 It tries to guess the master from the bot name, but may still fail |
| 2055 and return None. There is no longer a default master. | 2055 and return None. There is no longer a default master. |
| 2056 """ | 2056 """ |
| 2057 # Potentially ambiguous bot names are listed explicitly. | 2057 # Potentially ambiguous bot names are listed explicitly. |
| 2058 master_map = { | 2058 master_map = { |
| 2059 'chromium_presubmit': 'tryserver.chromium.linux', | 2059 'chromium_presubmit': 'tryserver.chromium.linux', |
| 2060 'blink_presubmit': 'tryserver.chromium.linux', | |
| 2061 'tools_build_presubmit': 'tryserver.chromium.linux', | 2060 'tools_build_presubmit': 'tryserver.chromium.linux', |
| 2062 } | 2061 } |
| 2063 master = master_map.get(bot) | 2062 master = master_map.get(bot) |
| 2064 if not master: | 2063 if not master: |
| 2065 if 'linux' in bot or 'android' in bot or 'presubmit' in bot: | 2064 if 'linux' in bot or 'android' in bot or 'presubmit' in bot: |
| 2066 master = 'tryserver.chromium.linux' | 2065 master = 'tryserver.chromium.linux' |
| 2067 elif 'win' in bot: | 2066 elif 'win' in bot: |
| 2068 master = 'tryserver.chromium.win' | 2067 master = 'tryserver.chromium.win' |
| 2069 elif 'mac' in bot or 'ios' in bot: | 2068 elif 'mac' in bot or 'ios' in bot: |
| 2070 master = 'tryserver.chromium.mac' | 2069 master = 'tryserver.chromium.mac' |
| (...skipping 20 matching lines...) Expand all Loading... |
| 2091 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 2090 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
| 2092 input_api, | 2091 input_api, |
| 2093 output_api, | 2092 output_api, |
| 2094 json_url='http://chromium-status.appspot.com/current?format=json')) | 2093 json_url='http://chromium-status.appspot.com/current?format=json')) |
| 2095 | 2094 |
| 2096 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 2095 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
| 2097 input_api, output_api)) | 2096 input_api, output_api)) |
| 2098 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 2097 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
| 2099 input_api, output_api)) | 2098 input_api, output_api)) |
| 2100 return results | 2099 return results |
| OLD | NEW |