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 |
(...skipping 13 matching lines...) Expand all Loading... |
24 ] | 24 ] |
25 output.extend(input_api.canned_checks.RunPylint( | 25 output.extend(input_api.canned_checks.RunPylint( |
26 input_api, | 26 input_api, |
27 output_api, | 27 output_api, |
28 pylintrc='pylintrc', | 28 pylintrc='pylintrc', |
29 black_list=build_pys, | 29 black_list=build_pys, |
30 extra_paths_list=[ | 30 extra_paths_list=[ |
31 J(), | 31 J(), |
32 J('gyp'), | 32 J('gyp'), |
33 J('buildbot'), | 33 J('buildbot'), |
| 34 J('..', 'util', 'lib', 'common'), |
34 J('..', '..', 'third_party', 'catapult', 'common', 'py_trace_event'), | 35 J('..', '..', 'third_party', 'catapult', 'common', 'py_trace_event'), |
35 J('..', '..', 'third_party', 'catapult', 'common', 'py_utils'), | 36 J('..', '..', 'third_party', 'catapult', 'common', 'py_utils'), |
36 J('..', '..', 'third_party', 'catapult', 'devil'), | 37 J('..', '..', 'third_party', 'catapult', 'devil'), |
37 J('..', '..', 'third_party', 'catapult', 'tracing') | 38 J('..', '..', 'third_party', 'catapult', 'tracing') |
38 ])) | 39 ])) |
39 output.extend(input_api.canned_checks.RunPylint( | 40 output.extend(input_api.canned_checks.RunPylint( |
40 input_api, | 41 input_api, |
41 output_api, | 42 output_api, |
42 white_list=build_pys, | 43 white_list=build_pys, |
43 extra_paths_list=[J('gyp'), J('gn')])) | 44 extra_paths_list=[J('gyp'), J('gn')])) |
44 | 45 |
45 # Disabled due to http://crbug.com/410936 | 46 # Disabled due to http://crbug.com/410936 |
46 #output.extend(input_api.canned_checks.RunUnitTestsInDirectory( | 47 #output.extend(input_api.canned_checks.RunUnitTestsInDirectory( |
47 #input_api, output_api, J('buildbot', 'tests'))) | 48 #input_api, output_api, J('buildbot', 'tests'))) |
48 | 49 |
49 pylib_test_env = dict(input_api.environ) | 50 pylib_test_env = dict(input_api.environ) |
50 pylib_test_env.update({ | 51 pylib_test_env.update({ |
51 'PYTHONPATH': build_android_dir, | 52 'PYTHONPATH': build_android_dir, |
52 'PYTHONDONTWRITEBYTECODE': '1', | 53 'PYTHONDONTWRITEBYTECODE': '1', |
53 }) | 54 }) |
54 output.extend(input_api.canned_checks.RunUnitTests( | 55 output.extend(input_api.canned_checks.RunUnitTests( |
55 input_api, | 56 input_api, |
56 output_api, | 57 output_api, |
57 unit_tests=[ | 58 unit_tests=[ |
58 J('.', 'emma_coverage_stats_test.py'), | 59 J('.', 'emma_coverage_stats_test.py'), |
59 J('gyp', 'util', 'md5_check_test.py'), | 60 J('gyp', 'util', 'md5_check_test.py'), |
60 J('play_services', 'update_test.py'), | 61 J('play_services', 'update_test.py'), |
61 J('pylib', 'base', 'test_dispatcher_unittest.py'), | |
62 J('pylib', 'gtest', 'gtest_test_instance_test.py'), | 62 J('pylib', 'gtest', 'gtest_test_instance_test.py'), |
63 J('pylib', 'instrumentation', | 63 J('pylib', 'instrumentation', |
64 'instrumentation_test_instance_test.py'), | 64 'instrumentation_test_instance_test.py'), |
65 J('pylib', 'local', 'device', 'local_device_test_run_test.py'), | 65 J('pylib', 'local', 'device', 'local_device_test_run_test.py'), |
66 J('pylib', 'results', 'json_results_test.py'), | 66 J('pylib', 'results', 'json_results_test.py'), |
67 J('pylib', 'symbols', 'elf_symbolizer_unittest.py'), | 67 J('pylib', 'symbols', 'elf_symbolizer_unittest.py'), |
68 J('pylib', 'utils', 'device_dependencies_test.py'), | 68 J('pylib', 'utils', 'device_dependencies_test.py'), |
69 J('pylib', 'utils', 'dexdump_test.py'), | 69 J('pylib', 'utils', 'dexdump_test.py'), |
70 J('pylib', 'utils', 'proguard_test.py'), | 70 J('pylib', 'utils', 'proguard_test.py'), |
71 ], | 71 ], |
72 env=pylib_test_env)) | 72 env=pylib_test_env)) |
73 | 73 |
74 return output | 74 return output |
75 | 75 |
76 | 76 |
77 def CheckChangeOnUpload(input_api, output_api): | 77 def CheckChangeOnUpload(input_api, output_api): |
78 return CommonChecks(input_api, output_api) | 78 return CommonChecks(input_api, output_api) |
79 | 79 |
80 | 80 |
81 def CheckChangeOnCommit(input_api, output_api): | 81 def CheckChangeOnCommit(input_api, output_api): |
82 return CommonChecks(input_api, output_api) | 82 return CommonChecks(input_api, output_api) |
OLD | NEW |