summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorjbudorick <jbudorick@chromium.org>2015-04-22 12:19:25 -0700
committerCommit bot <commit-bot@chromium.org>2015-04-22 19:19:42 +0000
commitb2099786da0b3256ce32d81632cac6998d0567bf (patch)
tree8eb7eda49fea9988c5715d5a75737e6928486ee3 /build
parent43b1dcb687d5e204973748ec5a1c9686de9c0239 (diff)
downloadchromium_src-b2099786da0b3256ce32d81632cac6998d0567bf.zip
chromium_src-b2099786da0b3256ce32d81632cac6998d0567bf.tar.gz
chromium_src-b2099786da0b3256ce32d81632cac6998d0567bf.tar.bz2
Revert of [Android] Convert RestartAdbd to DeviceUtils. (patchset #3 id:40001 of https://codereview.chromium.org/1100473004/)
Reason for revert: all perf bots are purple Original issue's description: > [Android] Convert RestartAdbd to DeviceUtils. > > BUG=267773 > > Committed: https://crrev.com/598af7c6bd830d6da9182d485842f7ca4e51a6b4 > Cr-Commit-Position: refs/heads/master@{#326304} TBR=perezju@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=267773 Review URL: https://codereview.chromium.org/1104543003 Cr-Commit-Position: refs/heads/master@{#326357}
Diffstat (limited to 'build')
-rw-r--r--build/android/pylib/device/device_utils.py26
-rw-r--r--build/android/pylib/perf/test_runner.py2
-rw-r--r--build/android/pylib/utils/test_environment.py2
3 files changed, 2 insertions, 28 deletions
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index ef28a21..ddda017 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -76,17 +76,6 @@ _CONTROL_CHARGING_COMMANDS = [
]
-# This must be done in a single shell command.
-_RESTART_ADBD_SCRIPT = """
- function restart() {
- stop adbd
- start adbd
- }
-
- restart &
-"""
-
-
@decorators.WithExplicitTimeoutAndRetries(
_DEFAULT_TIMEOUT, _DEFAULT_RETRIES)
def GetAVDs():
@@ -398,21 +387,6 @@ class DeviceUtils(object):
if wifi:
timeout_retry.WaitFor(wifi_enabled)
- @decorators.WithTimeoutAndRetriesFromInstance()
- def RestartAdbd(self, timeout=None, retries=None):
- """Restart adbd on the device.
-
- Args:
- timeout: timeout in seconds.
- retries: number of retries
- Raises:
- CommandTimeoutError on timeout.
- """
- with device_temp_file.DeviceTempFile(self.adb, suffix='.sh') as tmp:
- self.WriteFile(tmp.name, _RESTART_ADBD_SCRIPT)
- self.RunShellCommand(['.', tmp.name], as_root=True)
- self.adb.WaitForDevice()
-
REBOOT_DEFAULT_TIMEOUT = 10 * _DEFAULT_TIMEOUT
REBOOT_DEFAULT_RETRIES = _DEFAULT_RETRIES
diff --git a/build/android/pylib/perf/test_runner.py b/build/android/pylib/perf/test_runner.py
index 20f0fd0..9d1f437 100644
--- a/build/android/pylib/perf/test_runner.py
+++ b/build/android/pylib/perf/test_runner.py
@@ -235,7 +235,7 @@ class TestRunner(base_test_runner.BaseTestRunner):
try:
logging.warning('Unmapping device ports')
forwarder.Forwarder.UnmapAllDevicePorts(self.device)
- self.device.RestartAdbd()
+ self.device.old_interface.RestartAdbdOnDevice()
except Exception as e:
logging.error('Exception when tearing down device %s', e)
diff --git a/build/android/pylib/utils/test_environment.py b/build/android/pylib/utils/test_environment.py
index f55a4ac..e78eb5c 100644
--- a/build/android/pylib/utils/test_environment.py
+++ b/build/android/pylib/utils/test_environment.py
@@ -36,7 +36,7 @@ def CleanupLeftoverProcesses():
device_utils.RestartServer()
def cleanup_device(d):
- d.RestartAdbd()
+ d.old_interface.RestartAdbdOnDevice()
try:
d.EnableRoot()
except device_errors.CommandFailedError as e: