PRESUBMIT: Exclude supplement.gypi from _CheckNoSourcesAboveGyp check.
The webrtc/supplement.gypi contains a source listing of the
suppressions for TSan and LSan, which are located in source files.
It makes the presubmit fail when it's updated, which is confusing.
NOTRY=True
TESTED=Edited webrtc/supplement.gypi and ran "git cl presubmit" without an error.
Review URL: https://codereview.webrtc.org/1649423002
Cr-Commit-Position: refs/heads/master@{#11457}
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 3fb3ed1..ce175a4 100755
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -235,6 +235,10 @@
violating_gyp_files = set()
violating_source_entries = []
for gyp_file in gyp_files:
+ if 'supplement.gypi' in gyp_file.LocalPath():
+ # Exclude supplement.gypi from this check, as the LSan and TSan
+ # suppression files are located in a different location.
+ continue
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