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

Unified Diff: build/android/pylib/android_commands.py

Issue 32163002: Relands Android perf tests: kill adbd on the device after running a test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: forwarder2 Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 20684b7b07b317b870370d8476eb237f6cbffe23..c1f25eb200add21cc388b7fe5d7fac328bfc9576 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -458,6 +458,14 @@ class AndroidCommands(object):
if out.strip() != 'remount succeeded':
raise errors.MsgException('Remount failed: %s' % out)
+ def RestartAdbdOnDevice(self):
+ logging.info('Killing adbd on the device...')
+ adb_pids = self.ExtractPid('adbd')
+ if adb_pids:
+ self.RunShellCommandWithSU('kill %s' % ' '.join(adb_pids))
+ logging.info('Waiting for device to settle...')
+ self._adb.SendCommand('wait-for-device')
+
def RestartAdbServer(self):
"""Restart the adb server."""
ret = self.KillAdbServer()
« no previous file with comments | « no previous file | build/android/pylib/perf/test_runner.py » ('j') | tools/android/forwarder2/host_forwarder_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698