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

Side by Side Diff: build/android/pylib/instrumentation/test_runner.py

Issue 18522003: Remove unnecessary host parameter in 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. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Class for running instrumentation tests on a single device.""" 5 """Class for running instrumentation tests on a single device."""
6 6
7 import logging 7 import logging
8 import os 8 import os
9 import re 9 import re
10 import shutil 10 import shutil
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 # because it may have race condition when multiple processes are trying to 149 # because it may have race condition when multiple processes are trying to
150 # launch lighttpd with same port at same time. 150 # launch lighttpd with same port at same time.
151 http_server_ports = self.LaunchTestHttpServer( 151 http_server_ports = self.LaunchTestHttpServer(
152 os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port) 152 os.path.join(constants.DIR_SOURCE_ROOT), self._lighttp_port)
153 if self.ports_to_forward: 153 if self.ports_to_forward:
154 port_pairs = [(port, port) for port in self.ports_to_forward] 154 port_pairs = [(port, port) for port in self.ports_to_forward]
155 # We need to remember which ports the HTTP server is using, since the 155 # We need to remember which ports the HTTP server is using, since the
156 # forwarder will stomp on them otherwise. 156 # forwarder will stomp on them otherwise.
157 port_pairs.append(http_server_ports) 157 port_pairs.append(http_server_ports)
158 self.forwarder = forwarder.Forwarder(self.adb, self.build_type) 158 self.forwarder = forwarder.Forwarder(self.adb, self.build_type)
159 self.forwarder.Run(port_pairs, self.tool, '127.0.0.1') 159 self.forwarder.Run(port_pairs, self.tool)
160 self.flags.AddFlags(['--enable-test-intents']) 160 self.flags.AddFlags(['--enable-test-intents'])
161 161
162 def TearDown(self): 162 def TearDown(self):
163 """Cleans up the test harness and saves outstanding data from test run.""" 163 """Cleans up the test harness and saves outstanding data from test run."""
164 if self.forwarder: 164 if self.forwarder:
165 self.forwarder.Close() 165 self.forwarder.Close()
166 super(TestRunner, self).TearDown() 166 super(TestRunner, self).TearDown()
167 167
168 def TestSetup(self, test): 168 def TestSetup(self, test):
169 """Sets up the test harness for running a particular test. 169 """Sets up the test harness for running a particular test.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 duration_ms = 0 356 duration_ms = 0
357 message = str(e) 357 message = str(e)
358 if not message: 358 if not message:
359 message = 'No information.' 359 message = 'No information.'
360 results.AddResult(test_result.InstrumentationTestResult( 360 results.AddResult(test_result.InstrumentationTestResult(
361 test, base_test_result.ResultType.CRASH, start_date_ms, duration_ms, 361 test, base_test_result.ResultType.CRASH, start_date_ms, duration_ms,
362 log=message)) 362 log=message))
363 raw_result = None 363 raw_result = None
364 self.TestTeardown(test, raw_result) 364 self.TestTeardown(test, raw_result)
365 return (results, None if results.DidRunPass() else test) 365 return (results, None if results.DidRunPass() else test)
OLDNEW
« no previous file with comments | « build/android/pylib/forwarder.py ('k') | chrome/test/chromedriver/run_py_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698