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

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

Issue 20824008: Reland r212020: Move Python setup/tear down logic into Forwarder ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Close unused FDs Created 7 years, 5 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
« 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 b4ad7f44ddf20449c1fc2dc06e3a89d5e86ca799..c29a381e4c29605f3890fa4878701f244f60357a 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -151,11 +151,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._UnmapPorts([(port, port) for port in self.ports_to_forward])
super(TestRunner, self).TearDown()
def TestSetup(self, test):
@@ -169,7 +171,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
This is Rietveld 408576698