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

Unified Diff: build/android/pylib/perf/test_runner.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: pliard's comments 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/perf/test_runner.py
diff --git a/build/android/pylib/perf/test_runner.py b/build/android/pylib/perf/test_runner.py
index e3648f74aafd1d9d5c2f9f415c5512030ecb1cd1..e9addbd22020ed87a00c7671884ec7907c2d7ae0 100644
--- a/build/android/pylib/perf/test_runner.py
+++ b/build/android/pylib/perf/test_runner.py
@@ -46,8 +46,11 @@ import logging
import os
import pickle
import sys
+import time
rmcilroy 2013/10/21 17:34:43 I think you can get rid of this "time" import now.
bulach 2013/10/21 18:49:40 Done (and android_commands too..)
+from pylib import android_commands
from pylib import constants
+from pylib import forwarder
from pylib import pexpect
from pylib.base import base_test_result
from pylib.base import base_test_runner
@@ -121,6 +124,13 @@ class TestRunner(base_test_runner.BaseTestRunner):
Returns:
A tuple containing (Output, base_test_result.ResultType)
"""
+ try:
+ logging.warning('Unmapping device ports')
+ forwarder.Forwarder.UnmapAllDevicePorts(self.adb)
+ self.adb.RestartAdbdOnDevice()
+ except Exception as e:
+ logging.error('Exception when tearing down device %s', e)
+
cmd = ('%s --device %s' %
(self._tests[test_name], self.device))
logging.info('%s : %s', test_name, cmd)

Powered by Google App Engine
This is Rietveld 408576698