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

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: 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 | no next file » | 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 bb_annotations.PrintNamedStep('provision_devices')
241
240 # Restart adb to work around bugs, sleep to wait for usb discovery. 242 # Restart adb to work around bugs, sleep to wait for usb discovery.
241 RunCmd(['adb', 'kill-server']) 243 RunCmd(['adb', 'kill-server'])
242 RunCmd(['adb', 'start-server']) 244 RunCmd(['taskset', '-c', '0', 'adb', 'start-server'])
243 RunCmd(['sleep', '1']) 245 RunCmd(['sleep', '1'])
frankf 2013/08/14 17:03:01 All interactions with adb should go through androi
bulach 2013/08/14 17:56:24 hmm... I think this just emits the commands, it do
frankf 2013/08/14 18:05:44 I'm not following. RunCmd here just runs that exac
bulach 2013/08/14 18:09:59 ahn, you're right! my confusion, I thought this wo
244 246
245 bb_annotations.PrintNamedStep('provision_devices')
246 if options.reboot: 247 if options.reboot:
247 RebootDevices() 248 RebootDevices()
248 provision_cmd = ['build/android/provision_devices.py', '-t', options.target] 249 provision_cmd = ['build/android/provision_devices.py', '-t', options.target]
249 if options.auto_reconnect: 250 if options.auto_reconnect:
250 provision_cmd.append('--auto-reconnect') 251 provision_cmd.append('--auto-reconnect')
251 RunCmd(provision_cmd) 252 RunCmd(provision_cmd)
252 253
253 254
254 def DeviceStatusCheck(_): 255 def DeviceStatusCheck(_):
255 bb_annotations.PrintNamedStep('device_status_check') 256 bb_annotations.PrintNamedStep('device_status_check')
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 if unknown_tests: 379 if unknown_tests:
379 return sys.exit('Unknown tests %s' % list(unknown_tests)) 380 return sys.exit('Unknown tests %s' % list(unknown_tests))
380 381
381 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) 382 setattr(options, 'target', options.factory_properties.get('target', 'Debug'))
382 383
383 MainTestWrapper(options) 384 MainTestWrapper(options)
384 385
385 386
386 if __name__ == '__main__': 387 if __name__ == '__main__':
387 sys.exit(main(sys.argv)) 388 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698