| 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 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2099 It tries to guess the master from the bot name, but may still fail | 2099 It tries to guess the master from the bot name, but may still fail |
| 2100 and return None. There is no longer a default master. | 2100 and return None. There is no longer a default master. |
| 2101 """ | 2101 """ |
| 2102 # Potentially ambiguous bot names are listed explicitly. | 2102 # Potentially ambiguous bot names are listed explicitly. |
| 2103 master_map = { | 2103 master_map = { |
| 2104 'chromium_presubmit': 'tryserver.chromium.linux', | 2104 'chromium_presubmit': 'tryserver.chromium.linux', |
| 2105 'tools_build_presubmit': 'tryserver.chromium.linux', | 2105 'tools_build_presubmit': 'tryserver.chromium.linux', |
| 2106 } | 2106 } |
| 2107 master = master_map.get(bot) | 2107 master = master_map.get(bot) |
| 2108 if not master: | 2108 if not master: |
| 2109 if 'linux' in bot or 'android' in bot or 'presubmit' in bot: | 2109 if 'android' in bot: |
| 2110 master = 'tryserver.chromium.android' |
| 2111 elif 'linux' in bot or 'presubmit' in bot: |
| 2110 master = 'tryserver.chromium.linux' | 2112 master = 'tryserver.chromium.linux' |
| 2111 elif 'win' in bot: | 2113 elif 'win' in bot: |
| 2112 master = 'tryserver.chromium.win' | 2114 master = 'tryserver.chromium.win' |
| 2113 elif 'mac' in bot or 'ios' in bot: | 2115 elif 'mac' in bot or 'ios' in bot: |
| 2114 master = 'tryserver.chromium.mac' | 2116 master = 'tryserver.chromium.mac' |
| 2115 return master | 2117 return master |
| 2116 | 2118 |
| 2117 | 2119 |
| 2118 def GetDefaultTryConfigs(bots): | 2120 def GetDefaultTryConfigs(bots): |
| 2119 """Returns a list of ('bot', set(['tests']), filtered by [bots]. | 2121 """Returns a list of ('bot', set(['tests']), filtered by [bots]. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2135 results.extend(input_api.canned_checks.CheckTreeIsOpen( | 2137 results.extend(input_api.canned_checks.CheckTreeIsOpen( |
| 2136 input_api, | 2138 input_api, |
| 2137 output_api, | 2139 output_api, |
| 2138 json_url='http://chromium-status.appspot.com/current?format=json')) | 2140 json_url='http://chromium-status.appspot.com/current?format=json')) |
| 2139 | 2141 |
| 2140 results.extend(input_api.canned_checks.CheckChangeHasBugField( | 2142 results.extend(input_api.canned_checks.CheckChangeHasBugField( |
| 2141 input_api, output_api)) | 2143 input_api, output_api)) |
| 2142 results.extend(input_api.canned_checks.CheckChangeHasDescription( | 2144 results.extend(input_api.canned_checks.CheckChangeHasDescription( |
| 2143 input_api, output_api)) | 2145 input_api, output_api)) |
| 2144 return results | 2146 return results |
| OLD | NEW |