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 import copy | 5 import copy |
6 import fnmatch | 6 import fnmatch |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 | 9 |
10 from pylib import android_commands | 10 from pylib import android_commands |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 Returns: | 116 Returns: |
117 0 if successful, number of failing tests otherwise. | 117 0 if successful, number of failing tests otherwise. |
118 """ | 118 """ |
119 step_name = os.path.basename(options.test_suite).replace('-debug.apk', '') | 119 step_name = os.path.basename(options.test_suite).replace('-debug.apk', '') |
120 attached_devices = [] | 120 attached_devices = [] |
121 buildbot_emulators = [] | 121 buildbot_emulators = [] |
122 | 122 |
123 if options.use_emulator: | 123 if options.use_emulator: |
124 buildbot_emulators = emulator.LaunchEmulators(options.emulator_count, | 124 buildbot_emulators = emulator.LaunchEmulators(options.emulator_count, |
| 125 options.abi, |
125 wait_for_boot=True) | 126 wait_for_boot=True) |
126 attached_devices = [e.device for e in buildbot_emulators] | 127 attached_devices = [e.device for e in buildbot_emulators] |
127 elif options.test_device: | 128 elif options.test_device: |
128 attached_devices = [options.test_device] | 129 attached_devices = [options.test_device] |
129 else: | 130 else: |
130 attached_devices = android_commands.GetAttachedDevices() | 131 attached_devices = android_commands.GetAttachedDevices() |
131 | 132 |
132 if not attached_devices: | 133 if not attached_devices: |
133 logging.critical('A device must be attached and online.') | 134 logging.critical('A device must be attached and online.') |
134 return 1 | 135 return 1 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 failures = 0 | 213 failures = 0 |
213 for suite_name, suite_path in all_test_suites: | 214 for suite_name, suite_path in all_test_suites: |
214 # Give each test suite its own copy of options. | 215 # Give each test suite its own copy of options. |
215 test_options = copy.deepcopy(options) | 216 test_options = copy.deepcopy(options) |
216 test_options.test_suite = suite_path | 217 test_options.test_suite = suite_path |
217 failures += _RunATestSuite(test_options, suite_name) | 218 failures += _RunATestSuite(test_options, suite_name) |
218 | 219 |
219 if options.use_xvfb: | 220 if options.use_xvfb: |
220 framebuffer.Stop() | 221 framebuffer.Stop() |
221 return failures | 222 return failures |
OLD | NEW |