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..21f1d4916c54c9efaf2b70bc26a249d08bf87d41 100644 |
--- a/build/android/pylib/perf/test_runner.py |
+++ b/build/android/pylib/perf/test_runner.py |
@@ -48,6 +48,7 @@ import pickle |
import sys |
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 +122,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) |