| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Top-level presubmit script for Blink. | 5 """Top-level presubmit script for Blink. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 import os | 11 import os |
| 12 import re | 12 import re |
| 13 import sys | 13 import sys |
| 14 | 14 |
| 15 | 15 |
| 16 _EXCLUDED_PATHS = () | 16 _EXCLUDED_PATHS = ( |
| 17 # LayoutTests/imported is excluded because these files are automatically |
| 18 # imported, so we do not have direct control over their content. |
| 19 r'^third_party[\\\/]WebKit[\\\/]LayoutTests[\\\/]imported[\\\/].*', |
| 20 ) |
| 17 | 21 |
| 18 | 22 |
| 19 def _CheckForNonBlinkVariantMojomIncludes(input_api, output_api): | 23 def _CheckForNonBlinkVariantMojomIncludes(input_api, output_api): |
| 20 pattern = input_api.re.compile(r'#include\s+.+\.mojom(.*)\.h[>"]') | 24 pattern = input_api.re.compile(r'#include\s+.+\.mojom(.*)\.h[>"]') |
| 21 errors = [] | 25 errors = [] |
| 22 for f in input_api.AffectedFiles(): | 26 for f in input_api.AffectedFiles(): |
| 23 for line_num, line in f.ChangedContents(): | 27 for line_num, line in f.ChangedContents(): |
| 24 m = pattern.match(line) | 28 m = pattern.match(line) |
| 25 if m and m.group(1) != '-blink': | 29 if m and m.group(1) != '-blink': |
| 26 errors.append(' %s:%d %s' % ( | 30 errors.append(' %s:%d %s' % ( |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 new_description = description | 375 new_description = description |
| 372 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots) | 376 new_description += '\nCQ_INCLUDE_TRYBOTS=%s' % ';'.join(bots) |
| 373 results.append(output_api.PresubmitNotifyResult( | 377 results.append(output_api.PresubmitNotifyResult( |
| 374 'Automatically added slimming-paint-v2 tests to run on CQ due to ' | 378 'Automatically added slimming-paint-v2 tests to run on CQ due to ' |
| 375 'changes in paint or compositing directories.')) | 379 'changes in paint or compositing directories.')) |
| 376 | 380 |
| 377 if new_description != description: | 381 if new_description != description: |
| 378 rietveld_obj.update_description(issue, new_description) | 382 rietveld_obj.update_description(issue, new_description) |
| 379 | 383 |
| 380 return results | 384 return results |
| OLD | NEW |