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

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

Issue 1314313004: [Android][telemetry] Update pylib imports for modules that moved into devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « build/android/pylib/flag_changer.py ('k') | build/android/pylib/gtest/gtest_test_instance.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 # 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
11 11
12 from pylib import cmd_helper 12 from devil.utils import cmd_helper
13 from pylib import constants 13 from pylib import constants
14 from pylib import valgrind_tools 14 from pylib import valgrind_tools
15 15
16 import pylib.device.device_utils
17
18 16
19 def _GetProcessStartTime(pid): 17 def _GetProcessStartTime(pid):
20 return psutil.Process(pid).create_time 18 return psutil.Process(pid).create_time
21 19
22 20
23 class _FileLock(object): 21 class _FileLock(object):
24 """With statement-aware implementation of a file lock. 22 """With statement-aware implementation of a file lock.
25 23
26 File locks are needed for cross-process synchronization when the 24 File locks are needed for cross-process synchronization when the
27 multiprocessing Python module is used. 25 multiprocessing Python module is used.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 logging.info('Killing device_forwarder.') 316 logging.info('Killing device_forwarder.')
319 Forwarder._instance._initialized_devices.discard(str(device)) 317 Forwarder._instance._initialized_devices.discard(str(device))
320 if not device.FileExists(Forwarder._DEVICE_FORWARDER_PATH): 318 if not device.FileExists(Forwarder._DEVICE_FORWARDER_PATH):
321 return 319 return
322 320
323 cmd = '%s %s --kill-server' % (tool.GetUtilWrapper(), 321 cmd = '%s %s --kill-server' % (tool.GetUtilWrapper(),
324 Forwarder._DEVICE_FORWARDER_PATH) 322 Forwarder._DEVICE_FORWARDER_PATH)
325 device.RunShellCommand( 323 device.RunShellCommand(
326 cmd, env={'LD_LIBRARY_PATH': Forwarder._DEVICE_FORWARDER_FOLDER}, 324 cmd, env={'LD_LIBRARY_PATH': Forwarder._DEVICE_FORWARDER_FOLDER},
327 check_return=True) 325 check_return=True)
OLDNEW
« no previous file with comments | « build/android/pylib/flag_changer.py ('k') | build/android/pylib/gtest/gtest_test_instance.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698