From 74290b9d9c686603f1b8cafe9b4131a03485bf0c Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Wed, 15 Jun 2016 17:19:06 +0200 Subject: [PATCH] New rtc dump analyzing tool in Python CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_gn_upload R=henrik.lundin@webrtc.org, ivoc@webrtc.org, kwiberg@webrtc.org, peah@webrtc.org, phoglund@webrtc.org Review URL: https://codereview.webrtc.org/1999113002 . Cr-Commit-Position: refs/heads/master@{#13154} --- PRESUBMIT.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PRESUBMIT.py b/PRESUBMIT.py index 6d39145ca9..5d5a5c301a 100755 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -257,7 +257,7 @@ def _CheckNoRtcBaseDeps(input_api, gyp_files, output_api): def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api): # Disallow referencing source files with paths above the GYP file location. - source_pattern = input_api.re.compile(r'sources.*?\[(.*?)\]', + source_pattern = input_api.re.compile(r'\'sources\'.*?\[(.*?)\]', re.MULTILINE | re.DOTALL) file_pattern = input_api.re.compile(r"'((\.\./.*?)|(<\(webrtc_root\).*?))'") violating_gyp_files = set() @@ -271,8 +271,8 @@ def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api): for source_block_match in source_pattern.finditer(contents): # 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)): - source_file = file_list_match.group(0) + for file_list_match in file_pattern.finditer(source_block_match.group(1)): + source_file = file_list_match.group(1) if 'overrides/' not in source_file: violating_source_entries.append(source_file) violating_gyp_files.add(gyp_file)