OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 Chromium. | 5 """Top-level presubmit script for Chromium. |
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 |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 # Match the final or penultimate token if it is xxxtest so we can ignore it | 644 # Match the final or penultimate token if it is xxxtest so we can ignore it |
645 # when considering the special first include. | 645 # when considering the special first include. |
646 test_file_tag_pattern = input_api.re.compile( | 646 test_file_tag_pattern = input_api.re.compile( |
647 r'_[a-z]+test(?=(_[a-zA-Z0-9]+)?\.)') | 647 r'_[a-z]+test(?=(_[a-zA-Z0-9]+)?\.)') |
648 if_pattern = input_api.re.compile( | 648 if_pattern = input_api.re.compile( |
649 r'\s*#\s*(if|elif|else|endif|define|undef).*') | 649 r'\s*#\s*(if|elif|else|endif|define|undef).*') |
650 # Some files need specialized order of includes; exclude such files from this | 650 # Some files need specialized order of includes; exclude such files from this |
651 # check. | 651 # check. |
652 uncheckable_includes_pattern = input_api.re.compile( | 652 uncheckable_includes_pattern = input_api.re.compile( |
653 r'\s*#include ' | 653 r'\s*#include ' |
654 '("ipc/.*macros\.h"|<windows\.h>|".*gl.*autogen.h")\s*') | 654 '("ipc/.*macros\.h"|<windows\.h>|".*gl.*autogen.h"|"hb.*-(private|table).h
h")\s*') |
655 | 655 |
656 contents = f.NewContents() | 656 contents = f.NewContents() |
657 warnings = [] | 657 warnings = [] |
658 line_num = 0 | 658 line_num = 0 |
659 | 659 |
660 # Handle the special first include. If the first include file is | 660 # Handle the special first include. If the first include file is |
661 # some/path/file.h, the corresponding including file can be some/path/file.cc, | 661 # some/path/file.h, the corresponding including file can be some/path/file.cc, |
662 # some/other/path/file.cc, some/path/file_platform.cc, some/path/file-suffix.h | 662 # some/other/path/file.cc, some/path/file_platform.cc, some/path/file-suffix.h |
663 # etc. It's also possible that no special first include exists. | 663 # etc. It's also possible that no special first include exists. |
664 # If the included file is some/path/file_platform.h the including file could | 664 # If the included file is some/path/file_platform.h the including file could |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1627 builders.extend(['cros_x86']) | 1627 builders.extend(['cros_x86']) |
1628 | 1628 |
1629 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it | 1629 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it |
1630 # unless they're .gyp(i) files as changes to those files can break the gyp | 1630 # unless they're .gyp(i) files as changes to those files can break the gyp |
1631 # step on that bot. | 1631 # step on that bot. |
1632 if (not all(re.search('^chrome', f) for f in files) or | 1632 if (not all(re.search('^chrome', f) for f in files) or |
1633 any(re.search('\.gypi?$', f) for f in files)): | 1633 any(re.search('\.gypi?$', f) for f in files)): |
1634 builders.extend(['android_aosp']) | 1634 builders.extend(['android_aosp']) |
1635 | 1635 |
1636 return GetDefaultTryConfigs(builders) | 1636 return GetDefaultTryConfigs(builders) |
OLD | NEW |