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

Unified Diff: build/android/pylib/run_java_tests.py

Issue 10957052: Adapt python scripts to use the new Forwarder2 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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/forwarder.py ('k') | tools/android/forwarder2/host_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/run_java_tests.py
diff --git a/build/android/pylib/run_java_tests.py b/build/android/pylib/run_java_tests.py
index bf51bad943b928c03d309a37b975697f3285cddc..825a92c8e03ad750e84dbcaebb09c0767b9a7505 100644
--- a/build/android/pylib/run_java_tests.py
+++ b/build/android/pylib/run_java_tests.py
@@ -130,8 +130,7 @@ class TestRunner(BaseTestRunner):
self.ports_to_forward = ports_to_forward
self.test_results = TestResults()
- # List of forwarders created by this instance of TestRunner.
- self.forwarders = []
+ self.forwarder = None
if self.coverage:
if os.path.exists(TestRunner._COVERAGE_MERGED_FILENAME):
@@ -277,19 +276,17 @@ class TestRunner(BaseTestRunner):
self.LaunchTestHttpServer(os.path.join(constants.CHROME_DIR),
(constants.LIGHTTPD_RANDOM_PORT_FIRST +
self.shard_index))
-
if self.ports_to_forward:
- for port in self.ports_to_forward:
- self.forwarders.append(Forwarder(
- self.adb, [(port, port)], self.tool, '127.0.0.1', self.build_type))
+ port_pairs = [(port, port) for port in self.ports_to_forward]
+ self.forwarder = Forwarder(
+ self.adb, port_pairs, self.tool, '127.0.0.1', self.build_type)
self.CopyTestFilesOnce()
self.flags.AddFlags(['--enable-test-intents'])
def TearDown(self):
"""Cleans up the test harness and saves outstanding data from test run."""
- if self.forwarders:
- for forwarder in self.forwarders:
- forwarder.Close()
+ if self.forwarder:
+ self.forwarder.Close()
self.GenerateCoverageReportIfNeeded()
super(TestRunner, self).TearDown()
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | tools/android/forwarder2/host_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698