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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 # includes. | 659 # includes. |
660 line_num -= 1 | 660 line_num -= 1 |
661 break | 661 break |
662 | 662 |
663 # Split into scopes: Each region between #if and #endif is its own scope. | 663 # Split into scopes: Each region between #if and #endif is its own scope. |
664 scopes = [] | 664 scopes = [] |
665 current_scope = [] | 665 current_scope = [] |
666 for line in contents[line_num:]: | 666 for line in contents[line_num:]: |
667 line_num += 1 | 667 line_num += 1 |
668 if uncheckable_includes_pattern.match(line): | 668 if uncheckable_includes_pattern.match(line): |
669 return [] | 669 continue |
670 if if_pattern.match(line): | 670 if if_pattern.match(line): |
671 scopes.append(current_scope) | 671 scopes.append(current_scope) |
672 current_scope = [] | 672 current_scope = [] |
673 elif ((system_include_pattern.match(line) or | 673 elif ((system_include_pattern.match(line) or |
674 custom_include_pattern.match(line)) and | 674 custom_include_pattern.match(line)) and |
675 not excluded_include_pattern.match(line)): | 675 not excluded_include_pattern.match(line)): |
676 current_scope.append((line_num, line)) | 676 current_scope.append((line_num, line)) |
677 scopes.append(current_scope) | 677 scopes.append(current_scope) |
678 | 678 |
679 for scope in scopes: | 679 for scope in scopes: |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1425 trybots.extend(GetDefaultTryConfigs(['cros_x86'])) | 1425 trybots.extend(GetDefaultTryConfigs(['cros_x86'])) |
1426 | 1426 |
1427 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it | 1427 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it |
1428 # unless they're .gyp(i) files as changes to those files can break the gyp | 1428 # unless they're .gyp(i) files as changes to those files can break the gyp |
1429 # step on that bot. | 1429 # step on that bot. |
1430 if (not all(re.search('^chrome', f) for f in files) or | 1430 if (not all(re.search('^chrome', f) for f in files) or |
1431 any(re.search('\.gypi?$', f) for f in files)): | 1431 any(re.search('\.gypi?$', f) for f in files)): |
1432 trybots.extend(GetDefaultTryConfigs(['android_aosp'])) | 1432 trybots.extend(GetDefaultTryConfigs(['android_aosp'])) |
1433 | 1433 |
1434 return trybots | 1434 return trybots |
OLD | NEW |