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 cc. | 5 """Top-level presubmit script for cc. |
6 | 6 |
7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
8 details on the presubmit API built into gcl. | 8 for more details about the presubmit API built into depot_tools. |
9 """ | 9 """ |
10 | 10 |
11 import re | 11 import re |
12 import string | 12 import string |
13 | 13 |
14 CC_SOURCE_FILES=(r'^cc/.*\.(cc|h)$',) | 14 CC_SOURCE_FILES=(r'^cc/.*\.(cc|h)$',) |
15 | 15 |
16 def CheckChangeLintsClean(input_api, output_api): | 16 def CheckChangeLintsClean(input_api, output_api): |
17 input_api.cpplint._cpplint_state.ResetErrorCounts() # reset global state | 17 input_api.cpplint._cpplint_state.ResetErrorCounts() # reset global state |
18 source_filter = lambda x: input_api.FilterSourceFile( | 18 source_filter = lambda x: input_api.FilterSourceFile( |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 results += CheckPassByValue(input_api, output_api) | 220 results += CheckPassByValue(input_api, output_api) |
221 results += CheckChangeLintsClean(input_api, output_api) | 221 results += CheckChangeLintsClean(input_api, output_api) |
222 results += CheckTodos(input_api, output_api) | 222 results += CheckTodos(input_api, output_api) |
223 results += CheckNamespace(input_api, output_api) | 223 results += CheckNamespace(input_api, output_api) |
224 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) | 224 results += input_api.canned_checks.CheckPatchFormatted(input_api, output_api) |
225 return results | 225 return results |
226 | 226 |
227 def GetPreferredTrySlaves(project, change): | 227 def GetPreferredTrySlaves(project, change): |
228 return [ | 228 return [ |
229 'linux_layout_rel', | 229 'linux_layout_rel', |
230 'win_gpu', | |
231 'linux_gpu', | 230 'linux_gpu', |
232 'mac_gpu', | 231 'mac_gpu', |
233 'mac_gpu_retina', | 232 'mac_gpu_retina', |
| 233 'win_gpu', |
234 ] | 234 ] |
OLD | NEW |