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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
492 return input_api.RunTests(tests, parallel=True) | 492 return input_api.RunTests(tests, parallel=True) |
493 | 493 |
494 | 494 |
495 def _CommonChecks(input_api, output_api): | 495 def _CommonChecks(input_api, output_api): |
496 """Checks common to both upload and commit.""" | 496 """Checks common to both upload and commit.""" |
497 results = [] | 497 results = [] |
498 # Filter out files that are in objc or ios dirs from being cpplint-ed since | 498 # Filter out files that are in objc or ios dirs from being cpplint-ed since |
499 # they do not follow C++ lint rules. | 499 # they do not follow C++ lint rules. |
500 black_list = input_api.DEFAULT_BLACK_LIST + ( | 500 black_list = input_api.DEFAULT_BLACK_LIST + ( |
501 r".*\bobjc[\\\/].*", | 501 r".*\bobjc[\\\/].*", |
502 r".*objc\.[hcm]+$", | |
502 r"webrtc\/build\/ios\/SDK\/.*", | 503 r"webrtc\/build\/ios\/SDK\/.*", |
503 ) | 504 ) |
504 source_file_filter = lambda x: input_api.FilterSourceFile(x, None, black_list) | 505 source_file_filter = lambda x: input_api.FilterSourceFile(x, None, black_list) |
505 results.extend(_CheckApprovedFilesLintClean( | 506 results.extend(_CheckApprovedFilesLintClean( |
506 input_api, output_api, source_file_filter)) | 507 input_api, output_api, source_file_filter)) |
507 results.extend(input_api.canned_checks.RunPylint(input_api, output_api, | 508 results.extend(input_api.canned_checks.RunPylint(input_api, output_api, |
508 black_list=(r'^.*gviz_api\.py$', | 509 black_list=(r'^.*gviz_api\.py$', |
509 r'^.*gaeunit\.py$', | 510 r'^.*gaeunit\.py$', |
510 # Embedded shell-script fakes out pylint. | 511 # Embedded shell-script fakes out pylint. |
512 r'^PRESUBMIT\.py$', | |
kjellander_webrtc
2016/09/07 14:40:54
I don't see why we wouldn't enforce Pylint checks
| |
511 r'^build[\\\/].*\.py$', | 513 r'^build[\\\/].*\.py$', |
512 r'^buildtools[\\\/].*\.py$', | 514 r'^buildtools[\\\/].*\.py$', |
513 r'^chromium[\\\/].*\.py$', | 515 r'^chromium[\\\/].*\.py$', |
514 r'^mojo.*[\\\/].*\.py$', | 516 r'^mojo.*[\\\/].*\.py$', |
515 r'^out.*[\\\/].*\.py$', | 517 r'^out.*[\\\/].*\.py$', |
516 r'^testing[\\\/].*\.py$', | 518 r'^testing[\\\/].*\.py$', |
517 r'^third_party[\\\/].*\.py$', | 519 r'^third_party[\\\/].*\.py$', |
518 r'^tools[\\\/]clang[\\\/].*\.py$', | 520 r'^tools[\\\/]clang[\\\/].*\.py$', |
519 r'^tools[\\\/]generate_library_loader[\\\/].*\.py$', | 521 r'^tools[\\\/]generate_library_loader[\\\/].*\.py$', |
520 r'^tools[\\\/]generate_stubs[\\\/].*\.py$', | 522 r'^tools[\\\/]generate_stubs[\\\/].*\.py$', |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
620 for builder in masters[master]: | 622 for builder in masters[master]: |
621 if 'presubmit' in builder: | 623 if 'presubmit' in builder: |
622 # Do not trigger presubmit builders, since they're likely to fail | 624 # Do not trigger presubmit builders, since they're likely to fail |
623 # (e.g. OWNERS checks before finished code review), and we're running | 625 # (e.g. OWNERS checks before finished code review), and we're running |
624 # local presubmit anyway. | 626 # local presubmit anyway. |
625 pass | 627 pass |
626 else: | 628 else: |
627 try_config[master][builder] = ['defaulttests'] | 629 try_config[master][builder] = ['defaulttests'] |
628 | 630 |
629 return try_config | 631 return try_config |
OLD | NEW |