aboutsummaryrefslogtreecommitdiff
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorHenrik Kjellander <kjellander@webrtc.org>2015-06-02 13:10:04 +0200
committerHenrik Kjellander <kjellander@webrtc.org>2015-06-02 11:10:13 +0000
commit14771ac6bfe0c66134425b99212f443f03231229 (patch)
tree04466bed02448f1cdc8130114f5a103fc248e8f2 /PRESUBMIT.py
parent8f074183b1c86dcef9fa4f496a7f3e4337cde8b3 (diff)
downloadwebrtc-14771ac6bfe0c66134425b99212f443f03231229.tar.gz
Fix Python lint and unit tests
One of the unit tests added in https://webrtc-codereview.appspot.com/50079004/ is failing on Windows since os.sep is a backslash on Windows. The code is based on the contents of the DEPS file rather than the filesystem, so the right thing is to use '/' instead of os.sep. The PyLint blacklist also didn't work on Windows, causing it to process a massive list of files during presubmit. I also added a bunch of new entries to speed up lint execution on all platforms. TESTED=Ran the presubmit with this CL on Windows and Linux. R=phoglund@webrtc.org Review URL: https://webrtc-codereview.appspot.com/52029004 Cr-Commit-Position: refs/heads/master@{#9353}
Diffstat (limited to 'PRESUBMIT.py')
-rwxr-xr-xPRESUBMIT.py40
1 files changed, 23 insertions, 17 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 6d8f3304dd..f8ca580af4 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -257,24 +257,30 @@ def _CommonChecks(input_api, output_api):
black_list=(r'^.*gviz_api\.py$',
r'^.*gaeunit\.py$',
# Embedded shell-script fakes out pylint.
- r'^build/.*\.py$',
- r'^buildtools/.*\.py$',
- r'^chromium/.*\.py$',
- r'^out.*/.*\.py$',
- r'^testing/.*\.py$',
- r'^third_party/.*\.py$',
- r'^tools/clang/.*\.py$',
- r'^tools/gn/.*\.py$',
- r'^tools/gyp/.*\.py$',
- r'^tools/protoc_wrapper/.*\.py$',
- r'^tools/python/.*\.py$',
- r'^tools/python_charts/data/.*\.py$',
- r'^tools/refactoring/.*\.py$',
- r'^tools/swarming_client/.*\.py$',
+ r'^build[\\\/].*\.py$',
+ r'^buildtools[\\\/].*\.py$',
+ r'^chromium[\\\/].*\.py$',
+ r'^google_apis[\\\/].*\.py$',
+ r'^net.*[\\\/].*\.py$',
+ r'^out.*[\\\/].*\.py$',
+ r'^testing[\\\/].*\.py$',
+ r'^third_party[\\\/].*\.py$',
+ r'^tools[\\\/]find_depot_tools.py$',
+ r'^tools[\\\/]clang[\\\/].*\.py$',
+ r'^tools[\\\/]generate_library_loader[\\\/].*\.py$',
+ r'^tools[\\\/]gn[\\\/].*\.py$',
+ r'^tools[\\\/]gyp[\\\/].*\.py$',
+ r'^tools[\\\/]protoc_wrapper[\\\/].*\.py$',
+ r'^tools[\\\/]python[\\\/].*\.py$',
+ r'^tools[\\\/]python_charts[\\\/]data[\\\/].*\.py$',
+ r'^tools[\\\/]refactoring[\\\/].*\.py$',
+ r'^tools[\\\/]swarming_client[\\\/].*\.py$',
+ r'^tools[\\\/]vim[\\\/].*\.py$',
# TODO(phoglund): should arguably be checked.
- r'^tools/valgrind-webrtc/.*\.py$',
- r'^tools/valgrind/.*\.py$',
- r'^xcodebuild.*/.*\.py$',),
+ r'^tools[\\\/]valgrind-webrtc[\\\/].*\.py$',
+ r'^tools[\\\/]valgrind[\\\/].*\.py$',
+ r'^tools[\\\/]win[\\\/].*\.py$',
+ r'^xcodebuild.*[\\\/].*\.py$',),
disabled_warnings=['F0401', # Failed to import x
'E0611', # No package y in x
'W0232', # Class has no __init__ method