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

Unified Diff: build/android/pylib/perf/test_runner.py

Issue 25574002: Android perf tests: kill adbd on the device after running a test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf/test_runner.py
diff --git a/build/android/pylib/perf/test_runner.py b/build/android/pylib/perf/test_runner.py
index 3ca868ee6d727b66d8aeb0a6d728c5c43f91f35e..2161bb5a342afefb308105360f19cbf5aee23047 100644
--- a/build/android/pylib/perf/test_runner.py
+++ b/build/android/pylib/perf/test_runner.py
@@ -56,7 +56,9 @@ import pexpect
import pickle
import os
import sys
+import time
+from pylib import android_commands
from pylib import constants
from pylib.base import base_test_result
from pylib.base import base_test_runner
@@ -157,6 +159,18 @@ class TestRunner(base_test_runner.BaseTestRunner):
}
self._SaveResult(persisted_result)
+
+ try:
+ logging.info('Killing adbd on the device...')
+ adb = android_commands.AndroidCommands(self.device)
craigdh 2013/10/01 18:56:44 An adb object should already exists for this devic
navabi 2013/10/01 22:55:10 I don't understand. Where is the reference to that
bulach 2013/10/02 08:53:43 I think base_test_runner.BaseTestRunner has alread
+ adb_pids = adb.ExtractPid('adbd')
+ if adb_pids:
+ adb.RunShellCommandWithSU('kill %s' % ' '.join(adb_pids))
craigdh 2013/10/01 18:56:44 Instead of putting all this here, let's add androi
navabi 2013/10/01 22:55:10 +1
bulach 2013/10/02 08:53:43 Done.
+ logging.info('Waiting for device to settle...')
+ time.sleep(5)
+ except Exception as e:
+ logging.error('Exception when killing adbd %s', e)
+
return (output, result_type)
def RunTest(self, test_name):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698