aboutsummaryrefslogtreecommitdiff
path: root/PRESUBMIT.py
diff options
context:
space:
mode:
authorkjellander@webrtc.org <kjellander@webrtc.org>2015-03-04 07:08:11 +0000
committerkjellander@webrtc.org <kjellander@webrtc.org>2015-03-04 07:08:44 +0000
commitc98f6f368a789955f4dec5a58e0163571021ac4a (patch)
tree11c7378fb121609d7a84863432e18c6ef22f1e0a /PRESUBMIT.py
parentfc2f146af22dc5ba8d53d6e9ff1b7a93fa412d24 (diff)
downloadwebrtc-c98f6f368a789955f4dec5a58e0163571021ac4a.tar.gz
PRESUBMIT: Exclude overrides paths from source above GYP check.
Since base.gyp contains a couple of those. BUG=4185 TESTED=Ran git cl presubmit with a modified base.gyp without this patch - got errors about overrides. Ran another time with this patch applied - no errors. TBR=pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/44529004 Cr-Commit-Position: refs/heads/master@{#8586} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8586 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'PRESUBMIT.py')
-rwxr-xr-xPRESUBMIT.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 381119e157..90ede51366 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -134,10 +134,13 @@ def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api):
for gyp_file in gyp_files:
contents = input_api.ReadFile(gyp_file)
for source_block_match in source_pattern.finditer(contents):
- # Find all source list entries starting with ../ in the source block.
+ # Find all source list entries starting with ../ in the source block
+ # (exclude overrides entries).
for file_list_match in file_pattern.finditer(source_block_match.group(0)):
- violating_source_entries.append(file_list_match.group(0))
- violating_gyp_files.add(gyp_file)
+ source_file = file_list_match.group(0)
+ if 'overrides/' not in source_file:
+ violating_source_entries.append(source_file)
+ violating_gyp_files.add(gyp_file)
if violating_gyp_files:
return [output_api.PresubmitError(
'Referencing source files above the directory of the GYP file is not '