| OLD | NEW |
| 1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
| 4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
| 5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
| 6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
| 7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
| 8 | 8 |
| 9 import json | 9 import json |
| 10 import os | 10 import os |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 return [] | 228 return [] |
| 229 | 229 |
| 230 def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api): | 230 def _CheckNoSourcesAboveGyp(input_api, gyp_files, output_api): |
| 231 # Disallow referencing source files with paths above the GYP file location. | 231 # Disallow referencing source files with paths above the GYP file location. |
| 232 source_pattern = input_api.re.compile(r'sources.*?\[(.*?)\]', | 232 source_pattern = input_api.re.compile(r'sources.*?\[(.*?)\]', |
| 233 re.MULTILINE | re.DOTALL) | 233 re.MULTILINE | re.DOTALL) |
| 234 file_pattern = input_api.re.compile(r"'((\.\./.*?)|(<\(webrtc_root\).*?))'") | 234 file_pattern = input_api.re.compile(r"'((\.\./.*?)|(<\(webrtc_root\).*?))'") |
| 235 violating_gyp_files = set() | 235 violating_gyp_files = set() |
| 236 violating_source_entries = [] | 236 violating_source_entries = [] |
| 237 for gyp_file in gyp_files: | 237 for gyp_file in gyp_files: |
| 238 if 'supplement.gypi' in gyp_file.LocalPath(): |
| 239 # Exclude supplement.gypi from this check, as the LSan and TSan |
| 240 # suppression files are located in a different location. |
| 241 continue |
| 238 contents = input_api.ReadFile(gyp_file) | 242 contents = input_api.ReadFile(gyp_file) |
| 239 for source_block_match in source_pattern.finditer(contents): | 243 for source_block_match in source_pattern.finditer(contents): |
| 240 # Find all source list entries starting with ../ in the source block | 244 # Find all source list entries starting with ../ in the source block |
| 241 # (exclude overrides entries). | 245 # (exclude overrides entries). |
| 242 for file_list_match in file_pattern.finditer(source_block_match.group(0)): | 246 for file_list_match in file_pattern.finditer(source_block_match.group(0)): |
| 243 source_file = file_list_match.group(0) | 247 source_file = file_list_match.group(0) |
| 244 if 'overrides/' not in source_file: | 248 if 'overrides/' not in source_file: |
| 245 violating_source_entries.append(source_file) | 249 violating_source_entries.append(source_file) |
| 246 violating_gyp_files.add(gyp_file) | 250 violating_gyp_files.add(gyp_file) |
| 247 if violating_gyp_files: | 251 if violating_gyp_files: |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 for builder in masters[master]: | 469 for builder in masters[master]: |
| 466 if 'presubmit' in builder: | 470 if 'presubmit' in builder: |
| 467 # Do not trigger presubmit builders, since they're likely to fail | 471 # Do not trigger presubmit builders, since they're likely to fail |
| 468 # (e.g. OWNERS checks before finished code review), and we're running | 472 # (e.g. OWNERS checks before finished code review), and we're running |
| 469 # local presubmit anyway. | 473 # local presubmit anyway. |
| 470 pass | 474 pass |
| 471 else: | 475 else: |
| 472 try_config[master][builder] = ['defaulttests'] | 476 try_config[master][builder] = ['defaulttests'] |
| 473 | 477 |
| 474 return try_config | 478 return try_config |
| OLD | NEW |