Index: trunk/src/build/android/pylib/instrumentation/test_runner.py |
=================================================================== |
--- trunk/src/build/android/pylib/instrumentation/test_runner.py (revision 212053) |
+++ trunk/src/build/android/pylib/instrumentation/test_runner.py (working copy) |
@@ -153,13 +153,11 @@ |
http_server_ports = self.LaunchTestHttpServer( |
os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port) |
if self.ports_to_forward: |
- self.ForwardPorts([(port, port) for port in self.ports_to_forward]) |
+ self.StartForwarder([(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): |
@@ -172,6 +170,9 @@ |
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. |