| 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 try: | 1211 try: |
| 1212 sys.path = sys.path + [input_api.os_path.join( | 1212 sys.path = sys.path + [input_api.os_path.join( |
| 1213 input_api.PresubmitLocalPath(), 'tools', 'android', 'checkstyle')] | 1213 input_api.PresubmitLocalPath(), 'tools', 'android', 'checkstyle')] |
| 1214 import checkstyle | 1214 import checkstyle |
| 1215 finally: | 1215 finally: |
| 1216 # Restore sys.path to what it was before. | 1216 # Restore sys.path to what it was before. |
| 1217 sys.path = original_sys_path | 1217 sys.path = original_sys_path |
| 1218 | 1218 |
| 1219 return checkstyle.RunCheckstyle( | 1219 return checkstyle.RunCheckstyle( |
| 1220 input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml', | 1220 input_api, output_api, 'tools/android/checkstyle/chromium-style-5.0.xml', |
| 1221 black_list=_EXCLUDED_PATHS) | 1221 black_list=_EXCLUDED_PATHS + input_api.DEFAULT_BLACK_LIST) |
| 1222 | 1222 |
| 1223 | 1223 |
| 1224 def _CheckForCopyrightedCode(input_api, output_api): | 1224 def _CheckForCopyrightedCode(input_api, output_api): |
| 1225 """Verifies that newly added code doesn't contain copyrighted material | 1225 """Verifies that newly added code doesn't contain copyrighted material |
| 1226 and is properly licensed under the standard Chromium license. | 1226 and is properly licensed under the standard Chromium license. |
| 1227 | 1227 |
| 1228 As there can be false positives, we maintain a whitelist file. This check | 1228 As there can be false positives, we maintain a whitelist file. This check |
| 1229 also verifies that the whitelist file is up to date. | 1229 also verifies that the whitelist file is up to date. |
| 1230 """ | 1230 """ |
| 1231 import sys | 1231 import sys |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1693 if 'presubmit' in builder: | 1693 if 'presubmit' in builder: |
| 1694 builders[master].pop(builder) | 1694 builders[master].pop(builder) |
| 1695 | 1695 |
| 1696 # Match things like path/aura/file.cc and path/file_aura.cc. | 1696 # Match things like path/aura/file.cc and path/file_aura.cc. |
| 1697 # Same for chromeos. | 1697 # Same for chromeos. |
| 1698 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): | 1698 if any(re.search(r'[\\\/_](aura|chromeos)', f) for f in files): |
| 1699 tryserver_linux = builders.setdefault('tryserver.chromium.linux', {}) | 1699 tryserver_linux = builders.setdefault('tryserver.chromium.linux', {}) |
| 1700 tryserver_linux['linux_chromium_chromeos_asan_rel_ng'] = ['defaulttests'] | 1700 tryserver_linux['linux_chromium_chromeos_asan_rel_ng'] = ['defaulttests'] |
| 1701 | 1701 |
| 1702 return builders | 1702 return builders |
| OLD | NEW |