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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 author = input_api.change.author_email | 767 author = input_api.change.author_email |
768 if not author: | 768 if not author: |
769 input_api.logging.info('No author, skipping AUTHOR check') | 769 input_api.logging.info('No author, skipping AUTHOR check') |
770 return [] | 770 return [] |
771 authors_path = input_api.os_path.join( | 771 authors_path = input_api.os_path.join( |
772 input_api.PresubmitLocalPath(), 'AUTHORS') | 772 input_api.PresubmitLocalPath(), 'AUTHORS') |
773 valid_authors = ( | 773 valid_authors = ( |
774 input_api.re.match(r'[^#]+\s+\<(.+?)\>\s*$', line) | 774 input_api.re.match(r'[^#]+\s+\<(.+?)\>\s*$', line) |
775 for line in open(authors_path)) | 775 for line in open(authors_path)) |
776 valid_authors = [item.group(1).lower() for item in valid_authors if item] | 776 valid_authors = [item.group(1).lower() for item in valid_authors if item] |
777 if input_api.verbose: | |
778 print 'Valid authors are %s' % ', '.join(valid_authors) | |
779 if not any(fnmatch.fnmatch(author.lower(), valid) for valid in valid_authors): | 777 if not any(fnmatch.fnmatch(author.lower(), valid) for valid in valid_authors): |
| 778 input_api.logging.info('Valid authors are %s', ', '.join(valid_authors)) |
780 return [output_api.PresubmitPromptWarning( | 779 return [output_api.PresubmitPromptWarning( |
781 ('%s is not in AUTHORS file. If you are a new contributor, please visit' | 780 ('%s is not in AUTHORS file. If you are a new contributor, please visit' |
782 '\n' | 781 '\n' |
783 'http://www.chromium.org/developers/contributing-code and read the ' | 782 'http://www.chromium.org/developers/contributing-code and read the ' |
784 '"Legal" section\n' | 783 '"Legal" section\n' |
785 'If you are a chromite, verify the contributor signed the CLA.') % | 784 'If you are a chromite, verify the contributor signed the CLA.') % |
786 author)] | 785 author)] |
787 return [] | 786 return [] |
788 | 787 |
789 | 788 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 'win_aura', | 858 'win_aura', |
860 'win_rel', | 859 'win_rel', |
861 ] | 860 ] |
862 | 861 |
863 # Match things like path/aura/file.cc and path/file_aura.cc. | 862 # Match things like path/aura/file.cc and path/file_aura.cc. |
864 # Same for chromeos. | 863 # Same for chromeos. |
865 if any(re.search('[/_](aura|chromeos)', f) for f in files): | 864 if any(re.search('[/_](aura|chromeos)', f) for f in files): |
866 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] | 865 trybots += ['linux_chromeos_clang:compile', 'linux_chromeos_asan'] |
867 | 866 |
868 return trybots | 867 return trybots |
OLD | NEW |