OLD | NEW |
1 # Copyright (c) 2011 Google Inc. All rights reserved. | 1 # Copyright (c) 2011 Google Inc. 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 | 5 |
6 """Top-level presubmit script for GYP. | 6 """Top-level presubmit script for GYP. |
7 | 7 |
8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 8 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
9 for more details about the presubmit API built into gcl. | 9 for more details about the presubmit API built into gcl. |
10 """ | 10 """ |
(...skipping 16 matching lines...) Expand all Loading... |
27 ) % { | 27 ) % { |
28 'year': input_api.time.strftime('%Y'), | 28 'year': input_api.time.strftime('%Y'), |
29 } | 29 } |
30 | 30 |
31 report.extend(input_api.canned_checks.PanProjectChecks( | 31 report.extend(input_api.canned_checks.PanProjectChecks( |
32 input_api, output_api, license_header=license)) | 32 input_api, output_api, license_header=license)) |
33 report.extend(input_api.canned_checks.CheckTreeIsOpen( | 33 report.extend(input_api.canned_checks.CheckTreeIsOpen( |
34 input_api, output_api, | 34 input_api, output_api, |
35 'http://gyp-status.appspot.com/status', | 35 'http://gyp-status.appspot.com/status', |
36 'http://gyp-status.appspot.com/current')) | 36 'http://gyp-status.appspot.com/current')) |
| 37 |
| 38 import sys |
| 39 old_sys_path = sys.path |
| 40 try: |
| 41 sys.path = ['pylib', 'test/lib'] + sys.path |
| 42 report.extend(input_api.canned_checks.RunPylint( |
| 43 input_api, |
| 44 output_api)) |
| 45 finally: |
| 46 sys.path = old_sys_path |
37 return report | 47 return report |
38 | 48 |
39 | 49 |
40 def GetPreferredTrySlaves(): | 50 def GetPreferredTrySlaves(): |
41 return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac'] | 51 return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac'] |
OLD | NEW |