From c61635c2db30ee5daa43eeb49362468756efa10c Mon Sep 17 00:00:00 2001 From: kjellander Date: Tue, 2 Feb 2016 02:30:07 -0800 Subject: [PATCH] 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} --- PRESUBMIT.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 3fb3ed170e..ce175a4d42 100755 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -235,6 +235,10 @@ def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api): 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