| OLD | NEW |
| 1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 input_api, | 260 input_api, |
| 261 output_api, | 261 output_api, |
| 262 directory, | 262 directory, |
| 263 whitelist=[r'.+_test\.py$'])) | 263 whitelist=[r'.+_test\.py$'])) |
| 264 return input_api.RunTests(tests, parallel=True) | 264 return input_api.RunTests(tests, parallel=True) |
| 265 | 265 |
| 266 | 266 |
| 267 def _CommonChecks(input_api, output_api): | 267 def _CommonChecks(input_api, output_api): |
| 268 """Checks common to both upload and commit.""" | 268 """Checks common to both upload and commit.""" |
| 269 results = [] | 269 results = [] |
| 270 results.extend(_CheckApprovedFilesLintClean(input_api, output_api)) | 270 # Filter out files that are in objc or ios dirs from being cpplint-ed since |
| 271 # they do not follow C++ lint rules. |
| 272 black_list = input_api.DEFAULT_BLACK_LIST + ( |
| 273 r".*\bobjc[\\\/].*", |
| 274 ) |
| 275 source_file_filter = lambda x: input_api.FilterSourceFile(x, None, black_list) |
| 276 results.extend(_CheckApprovedFilesLintClean( |
| 277 input_api, output_api, source_file_filter)) |
| 271 results.extend(input_api.canned_checks.RunPylint(input_api, output_api, | 278 results.extend(input_api.canned_checks.RunPylint(input_api, output_api, |
| 272 black_list=(r'^.*gviz_api\.py$', | 279 black_list=(r'^.*gviz_api\.py$', |
| 273 r'^.*gaeunit\.py$', | 280 r'^.*gaeunit\.py$', |
| 274 # Embedded shell-script fakes out pylint. | 281 # Embedded shell-script fakes out pylint. |
| 275 r'^build[\\\/].*\.py$', | 282 r'^build[\\\/].*\.py$', |
| 276 r'^buildtools[\\\/].*\.py$', | 283 r'^buildtools[\\\/].*\.py$', |
| 277 r'^chromium[\\\/].*\.py$', | 284 r'^chromium[\\\/].*\.py$', |
| 278 r'^google_apis[\\\/].*\.py$', | 285 r'^google_apis[\\\/].*\.py$', |
| 279 r'^net.*[\\\/].*\.py$', | 286 r'^net.*[\\\/].*\.py$', |
| 280 r'^out.*[\\\/].*\.py$', | 287 r'^out.*[\\\/].*\.py$', |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 for builder in masters[master]: | 374 for builder in masters[master]: |
| 368 if 'presubmit' in builder: | 375 if 'presubmit' in builder: |
| 369 # Do not trigger presubmit builders, since they're likely to fail | 376 # Do not trigger presubmit builders, since they're likely to fail |
| 370 # (e.g. OWNERS checks before finished code review), and we're running | 377 # (e.g. OWNERS checks before finished code review), and we're running |
| 371 # local presubmit anyway. | 378 # local presubmit anyway. |
| 372 pass | 379 pass |
| 373 else: | 380 else: |
| 374 try_config[master][builder] = ['defaulttests'] | 381 try_config[master][builder] = ['defaulttests'] |
| 375 | 382 |
| 376 return try_config | 383 return try_config |
| OLD | NEW |