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

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

Issue 11879031: [Android] Move base tests classes to pylib/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 7 years, 11 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/base/__init__.py ('k') | build/android/pylib/base/base_test_sharder.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 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
11 11
12 import android_commands 12 from pylib import android_commands
13 import constants 13 from pylib import constants
14 from chrome_test_server_spawner import SpawningServer 14 from pylib import ports
15 import constants 15 from pylib.chrome_test_server_spawner import SpawningServer
16 from flag_changer import FlagChanger 16 from pylib.flag_changer import FlagChanger
17 from forwarder import Forwarder 17 from pylib.forwarder import Forwarder
18 from pylib.valgrind_tools import CreateTool
19 # TODO(frankf): Move this to pylib/utils
18 import lighttpd_server 20 import lighttpd_server
19 import ports
20 from valgrind_tools import CreateTool
21 21
22 22
23 # A file on device to store ports of net test server. The format of the file is 23 # A file on device to store ports of net test server. The format of the file is
24 # test-spawner-server-port:test-server-port 24 # test-spawner-server-port:test-server-port
25 NET_TEST_SERVER_PORT_INFO_FILE = 'net-test-server-ports' 25 NET_TEST_SERVER_PORT_INFO_FILE = 'net-test-server-ports'
26 26
27 27
28 class BaseTestRunner(object): 28 class BaseTestRunner(object):
29 """Base class for running tests on a single device. 29 """Base class for running tests on a single device.
30 30
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 # Wait for 2 seconds then restart. 201 # Wait for 2 seconds then restart.
202 time.sleep(2) 202 time.sleep(2)
203 if not server_ready: 203 if not server_ready:
204 logging.error(';'.join(error_msgs)) 204 logging.error(';'.join(error_msgs))
205 raise Exception('Can not start the test spawner server.') 205 raise Exception('Can not start the test spawner server.')
206 self._PushTestServerPortInfoToDevice() 206 self._PushTestServerPortInfoToDevice()
207 self._spawner_forwarder = self._CreateAndRunForwarder( 207 self._spawner_forwarder = self._CreateAndRunForwarder(
208 self.adb, 208 self.adb,
209 [(self.test_server_spawner_port, self.test_server_spawner_port)], 209 [(self.test_server_spawner_port, self.test_server_spawner_port)],
210 self.tool, '127.0.0.1', self.build_type) 210 self.tool, '127.0.0.1', self.build_type)
OLDNEW
« no previous file with comments | « build/android/pylib/base/__init__.py ('k') | build/android/pylib/base/base_test_sharder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698