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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
825 return output_list | 825 return output_list |
826 | 826 |
827 return [] | 827 return [] |
828 | 828 |
829 | 829 |
830 def _CheckSpamLogging(input_api, output_api): | 830 def _CheckSpamLogging(input_api, output_api): |
831 file_inclusion_pattern = r'.+%s' % _IMPLEMENTATION_EXTENSIONS | 831 file_inclusion_pattern = r'.+%s' % _IMPLEMENTATION_EXTENSIONS |
832 black_list = (_EXCLUDED_PATHS + | 832 black_list = (_EXCLUDED_PATHS + |
833 _TEST_CODE_EXCLUDED_PATHS + | 833 _TEST_CODE_EXCLUDED_PATHS + |
834 input_api.DEFAULT_BLACK_LIST + | 834 input_api.DEFAULT_BLACK_LIST + |
835 (r"^base[\\\/]logging\.h$",)) | 835 (r"^base[\\\/]logging\.h$", |
836 r"^base[\\\/]remoting[\\\/]logging\.h$",)) | |
Sergey Ulanov
2013/11/26 02:58:59
remoting/base/logging.h
weitao
2013/11/26 18:06:08
Done.
| |
836 source_file_filter = lambda x: input_api.FilterSourceFile( | 837 source_file_filter = lambda x: input_api.FilterSourceFile( |
837 x, white_list=(file_inclusion_pattern,), black_list=black_list) | 838 x, white_list=(file_inclusion_pattern,), black_list=black_list) |
838 | 839 |
839 log_info = [] | 840 log_info = [] |
840 printf = [] | 841 printf = [] |
841 | 842 |
842 for f in input_api.AffectedSourceFiles(source_file_filter): | 843 for f in input_api.AffectedSourceFiles(source_file_filter): |
843 contents = input_api.ReadFile(f, 'rb') | 844 contents = input_api.ReadFile(f, 'rb') |
844 if re.search(r"\bD?LOG\s*\(\s*INFO\s*\)", contents): | 845 if re.search(r"\bD?LOG\s*\(\s*INFO\s*\)", contents): |
845 log_info.append(f.LocalPath()) | 846 log_info.append(f.LocalPath()) |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1109 trybots += ['cros_x86'] | 1110 trybots += ['cros_x86'] |
1110 | 1111 |
1111 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it | 1112 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it |
1112 # unless they're .gyp(i) files as changes to those files can break the gyp | 1113 # unless they're .gyp(i) files as changes to those files can break the gyp |
1113 # step on that bot. | 1114 # step on that bot. |
1114 if (not all(re.search('^chrome', f) for f in files) or | 1115 if (not all(re.search('^chrome', f) for f in files) or |
1115 any(re.search('\.gypi?$', f) for f in files)): | 1116 any(re.search('\.gypi?$', f) for f in files)): |
1116 trybots += ['android_aosp'] | 1117 trybots += ['android_aosp'] |
1117 | 1118 |
1118 return trybots | 1119 return trybots |
OLD | NEW |