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

Side by Side Diff: build/android/pylib/forwarder.py

Issue 386053002: [Android] Switch to DeviceUtils versions of GetPid, TakeScreenshot, and GetIoStats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 6 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 # pylint: disable=W0212 5 # pylint: disable=W0212
6 6
7 import fcntl 7 import fcntl
8 import logging 8 import logging
9 import os 9 import os
10 import psutil 10 import psutil
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 cmd = '%s %s --kill-server' % (tool.GetUtilWrapper(), 334 cmd = '%s %s --kill-server' % (tool.GetUtilWrapper(),
335 Forwarder._DEVICE_FORWARDER_PATH) 335 Forwarder._DEVICE_FORWARDER_PATH)
336 device.old_interface.GetAndroidToolStatusAndOutput( 336 device.old_interface.GetAndroidToolStatusAndOutput(
337 cmd, lib_path=Forwarder._DEVICE_FORWARDER_FOLDER) 337 cmd, lib_path=Forwarder._DEVICE_FORWARDER_FOLDER)
338 338
339 # TODO(pliard): Remove the following call to KillAllBlocking() when we are 339 # TODO(pliard): Remove the following call to KillAllBlocking() when we are
340 # sure that the old version of device_forwarder (not supporting 340 # sure that the old version of device_forwarder (not supporting
341 # 'kill-server') is not running on the bots anymore. 341 # 'kill-server') is not running on the bots anymore.
342 timeout_sec = 5 342 timeout_sec = 5
343 try: 343 try:
344 device.KillAll( 344 device.KillAll('device_forwarder', blocking=True, timeout=timeout_sec)
345 'device_forwarder', blocking=True, timeout=timeout_sec)
346 except device_errors.CommandFailedError: 345 except device_errors.CommandFailedError:
347 pids = device.old_interface.ExtractPid('device_forwarder') 346 if device.GetPids('device_forwarder'):
348 if pids:
349 raise 347 raise
OLDNEW
« no previous file with comments | « build/android/pylib/device/device_utils_test.py ('k') | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698