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

Side by Side Diff: build/android/pylib/utils/test_environment.py

Issue 1049993003: Revert of [Android] Clean up old_interface in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/uiautomator/test_runner.py ('k') | build/android/test_runner.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 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 pylib.device import device_errors
10 from pylib.device import device_utils 10 from pylib.device import device_utils
(...skipping 16 matching lines...) Expand all
27 try: 27 try:
28 p.wait(1) 28 p.wait(1)
29 except Exception as e: 29 except Exception as e:
30 logging.warning('Failed waiting for %s to die. %s', p.pid, e) 30 logging.warning('Failed waiting for %s to die. %s', p.pid, e)
31 31
32 32
33 def CleanupLeftoverProcesses(): 33 def CleanupLeftoverProcesses():
34 """Clean up the test environment, restarting fresh adb and HTTP daemons.""" 34 """Clean up the test environment, restarting fresh adb and HTTP daemons."""
35 _KillWebServers() 35 _KillWebServers()
36 device_utils.RestartServer() 36 device_utils.RestartServer()
37 p = device_utils.DeviceUtils.parallel()
38 p.old_interface.RestartAdbdOnDevice()
39 try:
40 p.EnableRoot()
41 except device_errors.CommandFailedError as e:
42 # TODO(jbudorick) Handle this exception appropriately after interface
43 # conversions are finished.
44 logging.error(str(e))
45 p.WaitUntilFullyBooted()
37 46
38 def cleanup_device(d):
39 d.RestartAdbd()
40 try:
41 d.EnableRoot()
42 except device_errors.CommandFailedError as e:
43 logging.error(str(e))
44 d.WaitUntilFullyBooted()
45
46 device_utils.DeviceUtils.parallel().pMap(cleanup_device)
47
OLDNEW
« no previous file with comments | « build/android/pylib/uiautomator/test_runner.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698