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

Side by Side Diff: build/android/buildbot/bb_device_steps.py

Issue 22857005: Android: uses taskset when starting adb. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bb_utils.TESTING Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/pylib/android_commands.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 multiprocessing 8 import multiprocessing
9 import os 9 import os
10 import shutil 10 import shutil
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 def SpawnLogcatMonitor(): 230 def SpawnLogcatMonitor():
231 shutil.rmtree(LOGCAT_DIR, ignore_errors=True) 231 shutil.rmtree(LOGCAT_DIR, ignore_errors=True)
232 bb_utils.SpawnCmd([ 232 bb_utils.SpawnCmd([
233 os.path.join(CHROME_SRC, 'build', 'android', 'adb_logcat_monitor.py'), 233 os.path.join(CHROME_SRC, 'build', 'android', 'adb_logcat_monitor.py'),
234 LOGCAT_DIR]) 234 LOGCAT_DIR])
235 235
236 # Wait for logcat_monitor to pull existing logcat 236 # Wait for logcat_monitor to pull existing logcat
237 RunCmd(['sleep', '5']) 237 RunCmd(['sleep', '5'])
238 238
239 def ProvisionDevices(options): 239 def ProvisionDevices(options):
240 # Restart adb to work around bugs, sleep to wait for usb discovery. 240 bb_annotations.PrintNamedStep('provision_devices')
241 RunCmd(['adb', 'kill-server'])
242 RunCmd(['adb', 'start-server'])
243 RunCmd(['sleep', '1'])
244 241
245 bb_annotations.PrintNamedStep('provision_devices') 242 if not bb_utils.TESTING:
243 # Restart adb to work around bugs, sleep to wait for usb discovery.
244 adb = android_commands.AndroidCommands()
245 adb.RestartAdbServer()
246 RunCmd(['sleep', '1'])
247
246 if options.reboot: 248 if options.reboot:
247 RebootDevices() 249 RebootDevices()
248 provision_cmd = ['build/android/provision_devices.py', '-t', options.target] 250 provision_cmd = ['build/android/provision_devices.py', '-t', options.target]
249 if options.auto_reconnect: 251 if options.auto_reconnect:
250 provision_cmd.append('--auto-reconnect') 252 provision_cmd.append('--auto-reconnect')
251 RunCmd(provision_cmd) 253 RunCmd(provision_cmd)
252 254
253 255
254 def DeviceStatusCheck(_): 256 def DeviceStatusCheck(_):
255 bb_annotations.PrintNamedStep('device_status_check') 257 bb_annotations.PrintNamedStep('device_status_check')
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if unknown_tests: 380 if unknown_tests:
379 return sys.exit('Unknown tests %s' % list(unknown_tests)) 381 return sys.exit('Unknown tests %s' % list(unknown_tests))
380 382
381 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 383 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
382 384
383 MainTestWrapper(options) 385 MainTestWrapper(options)
384 386
385 387
386 if __name__ == '__main__': 388 if __name__ == '__main__':
387 sys.exit(main(sys.argv)) 389 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/android_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698