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

Side by Side Diff: build/android/pylib/base_test_runner.py

Issue 11312239: Modify the Android test running scripts so they can be used from WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
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 import contextlib 5 import contextlib
6 import httplib 6 import httplib
7 import logging 7 import logging
8 import os 8 import os
9 import tempfile 9 import tempfile
10 import time 10 import time
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 def CopyTestData(self, test_data_paths, dest_dir): 99 def CopyTestData(self, test_data_paths, dest_dir):
100 """Copies |test_data_paths| list of files/directories to |dest_dir|. 100 """Copies |test_data_paths| list of files/directories to |dest_dir|.
101 101
102 Args: 102 Args:
103 test_data_paths: A list of files or directories relative to |dest_dir| 103 test_data_paths: A list of files or directories relative to |dest_dir|
104 which should be copied to the device. The paths must exist in 104 which should be copied to the device. The paths must exist in
105 |CHROME_DIR|. 105 |CHROME_DIR|.
106 dest_dir: Absolute path to copy to on the device. 106 dest_dir: Absolute path to copy to on the device.
107 """ 107 """
108 for p in test_data_paths: 108 for p in test_data_paths:
109 if not isinstance(p, list):
bulach 2012/11/15 01:06:39 uh? 103 doesn't say this is allowed, who's passing
Peter Beverloo 2012/11/15 12:11:29 See single_test_runner.py:241; removed.
110 p = [p, p]
109 self.adb.PushIfNeeded( 111 self.adb.PushIfNeeded(
110 os.path.join(constants.CHROME_DIR, p), 112 os.path.join(constants.CHROME_DIR, p[0]),
111 os.path.join(dest_dir, p)) 113 os.path.join(dest_dir, p[1]))
112 114
113 def LaunchTestHttpServer(self, document_root, port=None, 115 def LaunchTestHttpServer(self, document_root, port=None,
114 extra_config_contents=None): 116 extra_config_contents=None):
115 """Launches an HTTP server to serve HTTP tests. 117 """Launches an HTTP server to serve HTTP tests.
116 118
117 Args: 119 Args:
118 document_root: Document root of the HTTP server. 120 document_root: Document root of the HTTP server.
119 port: port on which we want to the http server bind. 121 port: port on which we want to the http server bind.
120 extra_config_contents: Extra config contents for the HTTP server. 122 extra_config_contents: Extra config contents for the HTTP server.
121 """ 123 """
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 # Wait for 2 seconds then restart. 203 # Wait for 2 seconds then restart.
202 time.sleep(2) 204 time.sleep(2)
203 if not server_ready: 205 if not server_ready:
204 logging.error(';'.join(error_msgs)) 206 logging.error(';'.join(error_msgs))
205 raise Exception('Can not start the test spawner server.') 207 raise Exception('Can not start the test spawner server.')
206 self._PushTestServerPortInfoToDevice() 208 self._PushTestServerPortInfoToDevice()
207 self._spawner_forwarder = self._CreateAndRunForwarder( 209 self._spawner_forwarder = self._CreateAndRunForwarder(
208 self.adb, 210 self.adb,
209 [(self.test_server_spawner_port, self.test_server_spawner_port)], 211 [(self.test_server_spawner_port, self.test_server_spawner_port)],
210 self.tool, '127.0.0.1', self.build_type) 212 self.tool, '127.0.0.1', self.build_type)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698