| 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 2164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2175 | 2175 |
| 2176 | 2176 |
| 2177 def GetTryServerMasterForBot(bot): | 2177 def GetTryServerMasterForBot(bot): |
| 2178 """Returns the Try Server master for the given bot. | 2178 """Returns the Try Server master for the given bot. |
| 2179 | 2179 |
| 2180 It tries to guess the master from the bot name, but may still fail | 2180 It tries to guess the master from the bot name, but may still fail |
| 2181 and return None. There is no longer a default master. | 2181 and return None. There is no longer a default master. |
| 2182 """ | 2182 """ |
| 2183 # Potentially ambiguous bot names are listed explicitly. | 2183 # Potentially ambiguous bot names are listed explicitly. |
| 2184 master_map = { | 2184 master_map = { |
| 2185 'chromium_presubmit': 'tryserver.chromium.linux', | 2185 'chromium_presubmit': 'master.tryserver.chromium.linux', |
| 2186 'tools_build_presubmit': 'tryserver.chromium.linux', | 2186 'tools_build_presubmit': 'master.tryserver.chromium.linux', |
| 2187 } | 2187 } |
| 2188 master = master_map.get(bot) | 2188 master = master_map.get(bot) |
| 2189 if not master: | 2189 if not master: |
| 2190 if 'android' in bot: | 2190 if 'android' in bot: |
| 2191 master = 'tryserver.chromium.android' | 2191 master = 'master.tryserver.chromium.android' |
| 2192 elif 'linux' in bot or 'presubmit' in bot: | 2192 elif 'linux' in bot or 'presubmit' in bot: |
| 2193 master = 'tryserver.chromium.linux' | 2193 master = 'master.tryserver.chromium.linux' |
| 2194 elif 'win' in bot: | 2194 elif 'win' in bot: |
| 2195 master = 'tryserver.chromium.win' | 2195 master = 'master.tryserver.chromium.win' |
| 2196 elif 'mac' in bot or 'ios' in bot: | 2196 elif 'mac' in bot or 'ios' in bot: |
| 2197 master = 'tryserver.chromium.mac' | 2197 master = 'master.tryserver.chromium.mac' |
| 2198 return master | 2198 return master |
| 2199 | 2199 |
| 2200 | 2200 |
| 2201 def GetDefaultTryConfigs(bots): | 2201 def GetDefaultTryConfigs(bots): |
| 2202 """Returns a list of ('bot', set(['tests']), filtered by [bots]. | 2202 """Returns a list of ('bot', set(['tests']), filtered by [bots]. |
| 2203 """ | 2203 """ |
| 2204 | 2204 |
| 2205 builders_and_tests = dict((bot, set(['defaulttests'])) for bot in bots) | 2205 builders_and_tests = dict((bot, set(['defaulttests'])) for bot in bots) |
| 2206 | 2206 |
| 2207 # Build up the mapping from tryserver master to bot/test. | 2207 # Build up the mapping from tryserver master to bot/test. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2218 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 2218 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
| 2219 input_api, | 2219 input_api, |
| 2220 output_api, | 2220 output_api, |
| 2221 json_url='http://chromium-status.appspot.com/current?format=json')) | 2221 json_url='http://chromium-status.appspot.com/current?format=json')) |
| 2222 | 2222 |
| 2223 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 2223 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
| 2224 input_api, output_api)) | 2224 input_api, output_api)) |
| 2225 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 2225 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
| 2226 input_api, output_api)) | 2226 input_api, output_api)) |
| 2227 return results | 2227 return results |
| OLD | NEW |