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

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

Issue 18854020: Avoid forwarding the test HTTP port twice. (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. 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 | « no previous file | no next file » | 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 29225a5c184ea418bde984c39ca68cde9b268f7d..60000bf71be0e2d871b8430e6cee4bd9ee5c5d76 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -14,7 +14,6 @@ import time
from pylib import android_commands
from pylib import cmd_helper
from pylib import constants
-from pylib import forwarder
from pylib import json_perf_parser
from pylib import perf_tests_helper
from pylib import valgrind_tools
@@ -86,7 +85,6 @@ class TestRunner(base_test_runner.BaseTestRunner):
self.test_pkg = test_pkg
self.ports_to_forward = ports_to_forward
self.install_apk = options.install_apk
- self.forwarder = None
#override
def InstallTestPackage(self):
@@ -151,18 +149,11 @@ class TestRunner(base_test_runner.BaseTestRunner):
http_server_ports = self.LaunchTestHttpServer(
Joao da Silva 2013/07/09 14:39:26 Basically, this line already starts forwarding for
os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port)
if self.ports_to_forward:
- port_pairs = [(port, port) for port in self.ports_to_forward]
- # We need to remember which ports the HTTP server is using, since the
- # forwarder will stomp on them otherwise.
- port_pairs.append(http_server_ports)
- self.forwarder = forwarder.Forwarder(self.adb, self.build_type)
- self.forwarder.Run(port_pairs, self.tool)
+ 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.forwarder:
- self.forwarder.Close()
super(TestRunner, self).TearDown()
def TestSetup(self, test):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698