| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 options: options for running the tests. | 113 options: options for running the tests. |
| 114 suite_name: name of the test suite being run. | 114 suite_name: name of the test suite being run. |
| 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.abi == 'arm': |
| 124 options.abi = 'armeabi-v7a' |
| 125 |
| 123 if options.use_emulator: | 126 if options.use_emulator: |
| 124 buildbot_emulators = emulator.LaunchEmulators(options.emulator_count, | 127 buildbot_emulators = emulator.LaunchEmulators(options.emulator_count, |
| 128 options.abi, |
| 125 wait_for_boot=True) | 129 wait_for_boot=True) |
| 126 attached_devices = [e.device for e in buildbot_emulators] | 130 attached_devices = [e.device for e in buildbot_emulators] |
| 127 elif options.test_device: | 131 elif options.test_device: |
| 128 attached_devices = [options.test_device] | 132 attached_devices = [options.test_device] |
| 129 else: | 133 else: |
| 130 attached_devices = android_commands.GetAttachedDevices() | 134 attached_devices = android_commands.GetAttachedDevices() |
| 131 | 135 |
| 132 if not attached_devices: | 136 if not attached_devices: |
| 133 logging.critical('A device must be attached and online.') | 137 logging.critical('A device must be attached and online.') |
| 134 return 1 | 138 return 1 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 failures = 0 | 216 failures = 0 |
| 213 for suite_name, suite_path in all_test_suites: | 217 for suite_name, suite_path in all_test_suites: |
| 214 # Give each test suite its own copy of options. | 218 # Give each test suite its own copy of options. |
| 215 test_options = copy.deepcopy(options) | 219 test_options = copy.deepcopy(options) |
| 216 test_options.test_suite = suite_path | 220 test_options.test_suite = suite_path |
| 217 failures += _RunATestSuite(test_options, suite_name) | 221 failures += _RunATestSuite(test_options, suite_name) |
| 218 | 222 |
| 219 if options.use_xvfb: | 223 if options.use_xvfb: |
| 220 framebuffer.Stop() | 224 framebuffer.Stop() |
| 221 return failures | 225 return failures |
| OLD | NEW |