OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import collections | 6 import collections |
7 import glob | 7 import glob |
8 import hashlib | 8 import hashlib |
9 import json | 9 import json |
10 import os | 10 import os |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 options: options object. | 211 options: options object. |
212 step_name: either 'telemetry_unittests' or 'telemetry_perf_unittests' | 212 step_name: either 'telemetry_unittests' or 'telemetry_perf_unittests' |
213 run_tests_path: path to run_tests script (tools/perf/run_tests for | 213 run_tests_path: path to run_tests script (tools/perf/run_tests for |
214 perf_unittests and tools/telemetry/run_tests for | 214 perf_unittests and tools/telemetry/run_tests for |
215 telemetry_unittests) | 215 telemetry_unittests) |
216 """ | 216 """ |
217 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) | 217 InstallApk(options, INSTRUMENTATION_TESTS['ChromeShell'], False) |
218 args = ['--browser', 'android-chrome-shell'] | 218 args = ['--browser', 'android-chrome-shell'] |
219 devices = android_commands.GetAttachedDevices() | 219 devices = android_commands.GetAttachedDevices() |
220 if devices: | 220 if devices: |
221 args = args + ['--device', devices[0]] | 221 args = args + ['--device', 'android'] |
222 bb_annotations.PrintNamedStep(step_name) | 222 bb_annotations.PrintNamedStep(step_name) |
223 RunCmd([run_tests_path] + args) | 223 RunCmd([run_tests_path] + args) |
224 | 224 |
225 | 225 |
226 def InstallApk(options, test, print_step=False): | 226 def InstallApk(options, test, print_step=False): |
227 """Install an apk to all phones. | 227 """Install an apk to all phones. |
228 | 228 |
229 Args: | 229 Args: |
230 options: options object | 230 options: options object |
231 test: An I_TEST namedtuple | 231 test: An I_TEST namedtuple |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 | 753 |
754 if options.coverage_bucket: | 754 if options.coverage_bucket: |
755 setattr(options, 'coverage_dir', | 755 setattr(options, 'coverage_dir', |
756 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 756 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
757 | 757 |
758 MainTestWrapper(options) | 758 MainTestWrapper(options) |
759 | 759 |
760 | 760 |
761 if __name__ == '__main__': | 761 if __name__ == '__main__': |
762 sys.exit(main(sys.argv)) | 762 sys.exit(main(sys.argv)) |
OLD | NEW |