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}
This commit is contained in:
kjellander 2016-02-02 02:30:07 -08:00 committed by Commit bot
parent c5a39c2591
commit c61635c2db

View file

@ -235,6 +235,10 @@ def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api):
violating_gyp_files = set() violating_gyp_files = set()
violating_source_entries = [] violating_source_entries = []
for gyp_file in gyp_files: 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) contents = input_api.ReadFile(gyp_file)
for source_block_match in source_pattern.finditer(contents): 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