| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 """Presubmit script for android buildbot. | 5 """Presubmit script for android buildbot. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for |
| 8 details on the presubmit API built into depot_tools. | 8 details on the presubmit API built into depot_tools. |
| 9 """ | 9 """ |
| 10 | 10 |
| 11 | 11 |
| 12 def CommonChecks(input_api, output_api): | 12 def CommonChecks(input_api, output_api): |
| 13 output = [] | 13 output = [] |
| 14 | 14 |
| 15 def J(*dirs): | 15 def J(*dirs): |
| 16 """Returns a path relative to presubmit directory.""" | 16 """Returns a path relative to presubmit directory.""" |
| 17 return input_api.os_path.join(input_api.PresubmitLocalPath(), *dirs) | 17 return input_api.os_path.join(input_api.PresubmitLocalPath(), *dirs) |
| 18 | 18 |
| 19 output.extend(input_api.canned_checks.RunPylint( | 19 output.extend(input_api.canned_checks.RunPylint( |
| 20 input_api, | 20 input_api, |
| 21 output_api, | 21 output_api, |
| 22 pylintrc='pylintrc', |
| 22 black_list=[r'pylib/symbols/.*\.py$', r'gyp/.*\.py$', r'gn/.*\.py'], | 23 black_list=[r'pylib/symbols/.*\.py$', r'gyp/.*\.py$', r'gn/.*\.py'], |
| 23 extra_paths_list=[J(), J('buildbot')])) | 24 extra_paths_list=[J(), J('buildbot')])) |
| 24 output.extend(input_api.canned_checks.RunPylint( | 25 output.extend(input_api.canned_checks.RunPylint( |
| 25 input_api, | 26 input_api, |
| 26 output_api, | 27 output_api, |
| 27 white_list=[r'gyp/.*\.py$', r'gn/.*\.py'], | 28 white_list=[r'gyp/.*\.py$', r'gn/.*\.py'], |
| 28 extra_paths_list=[J('gyp'), J('gn')])) | 29 extra_paths_list=[J('gyp'), J('gn')])) |
| 29 | 30 |
| 30 # Disabled due to http://crbug.com/410936 | 31 # Disabled due to http://crbug.com/410936 |
| 31 #output.extend(input_api.canned_checks.RunUnitTestsInDirectory( | 32 #output.extend(input_api.canned_checks.RunUnitTestsInDirectory( |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 env=pylib_test_env)) | 55 env=pylib_test_env)) |
| 55 return output | 56 return output |
| 56 | 57 |
| 57 | 58 |
| 58 def CheckChangeOnUpload(input_api, output_api): | 59 def CheckChangeOnUpload(input_api, output_api): |
| 59 return CommonChecks(input_api, output_api) | 60 return CommonChecks(input_api, output_api) |
| 60 | 61 |
| 61 | 62 |
| 62 def CheckChangeOnCommit(input_api, output_api): | 63 def CheckChangeOnCommit(input_api, output_api): |
| 63 return CommonChecks(input_api, output_api) | 64 return CommonChecks(input_api, output_api) |
| OLD | NEW |