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

Side by Side Diff: build/android/pylib/utils/test_environment.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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 logging 5 import logging
6 import psutil 6 import psutil
7 import signal 7 import signal
8 8
9 from pylib.device import device_errors 9 from devil.android import device_errors
10 from pylib.device import device_utils 10 from devil.android import device_utils
11 11
12 12
13 def _KillWebServers(): 13 def _KillWebServers():
14 for s in [signal.SIGTERM, signal.SIGINT, signal.SIGQUIT, signal.SIGKILL]: 14 for s in [signal.SIGTERM, signal.SIGINT, signal.SIGQUIT, signal.SIGKILL]:
15 signalled = [] 15 signalled = []
16 for server in ['lighttpd', 'webpagereplay']: 16 for server in ['lighttpd', 'webpagereplay']:
17 for p in psutil.process_iter(): 17 for p in psutil.process_iter():
18 try: 18 try:
19 if not server in ' '.join(p.cmdline): 19 if not server in ' '.join(p.cmdline):
20 continue 20 continue
(...skipping 21 matching lines...) Expand all
42 def cleanup_device(d): 42 def cleanup_device(d):
43 d.RestartAdbd() 43 d.RestartAdbd()
44 try: 44 try:
45 d.EnableRoot() 45 d.EnableRoot()
46 except device_errors.CommandFailedError: 46 except device_errors.CommandFailedError:
47 logging.exception('Failed to enable root') 47 logging.exception('Failed to enable root')
48 d.WaitUntilFullyBooted() 48 d.WaitUntilFullyBooted()
49 49
50 device_utils.DeviceUtils.parallel(devices).pMap(cleanup_device) 50 device_utils.DeviceUtils.parallel(devices).pMap(cleanup_device)
51 51
OLDNEW
« no previous file with comments | « build/android/pylib/utils/reraiser_thread_unittest.py ('k') | build/android/pylib/utils/timeout_retry_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698