Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Side by Side Diff: build/android/pylib/gtest/dispatch.py

Issue 13300002: Android: fixes emulator support in unit test scripts. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698