Chromium Code Reviews

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

Issue 19550004: Reland r212020: Move Python setup/tear down logic into Forwarder ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « build/android/pylib/host_driven/python_test_sharder.py ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5fa11357314c68ef718169a221f20cd761fbfe1e 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):
@@ -171,7 +173,7 @@ class TestRunner(base_test_runner.BaseTestRunner):
self.tool.SetupEnvironment()
# Make sure the forwarder is still running.
- self.RestartHttpServerForwarderIfNecessary()
+ self._RestartHttpServerForwarderIfNecessary()
def _IsPerfTest(self, test):
"""Determines whether a test is a performance test.
« no previous file with comments | « build/android/pylib/host_driven/python_test_sharder.py ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »

Powered by Google App Engine