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
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 381119e..90ede51 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -134,10 +134,13 @@
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 '