Index: build/android/pylib/instrumentation/test_runner.py |
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py |
index a2692faf65e6c1608765fcb6bff815639150b2c0..3015925b0810f1272228952b89abc697d1972055 100644 |
--- a/build/android/pylib/instrumentation/test_runner.py |
+++ b/build/android/pylib/instrumentation/test_runner.py |
@@ -153,11 +153,13 @@ class TestRunner(base_test_runner.BaseTestRunner): |
http_server_ports = self.LaunchTestHttpServer( |
os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port) |
if self.ports_to_forward: |
- self.StartForwarder([(port, port) for port in self.ports_to_forward]) |
+ self.ForwardPorts([(port, port) for port in self.ports_to_forward]) |
self.flags.AddFlags(['--enable-test-intents']) |
def TearDown(self): |
"""Cleans up the test harness and saves outstanding data from test run.""" |
+ if self.ports_to_forward: |
+ self._UnmapPortPairs(self.ports_to_forward) |
super(TestRunner, self).TearDown() |
def TestSetup(self, test): |
@@ -170,9 +172,6 @@ class TestRunner(base_test_runner.BaseTestRunner): |
self._SetupIndividualTestTimeoutScale(test) |
self.tool.SetupEnvironment() |
- # Make sure the forwarder is still running. |
- self.RestartHttpServerForwarderIfNecessary() |
- |
def _IsPerfTest(self, test): |
"""Determines whether a test is a performance test. |