OLD | NEW |
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 """Base class for running tests on a single device.""" | 5 """Base class for running tests on a single device.""" |
6 | 6 |
| 7 # TODO(jbudorick) Deprecate and remove this class and all subclasses after |
| 8 # any relevant parts have been ported to the new environment + test instance |
| 9 # model. |
| 10 |
7 import logging | 11 import logging |
8 import time | 12 import time |
9 | 13 |
10 from pylib import ports | 14 from pylib import ports |
11 from pylib.chrome_test_server_spawner import SpawningServer | 15 from pylib.chrome_test_server_spawner import SpawningServer |
12 from pylib.device import device_utils | 16 from pylib.device import device_utils |
13 from pylib.forwarder import Forwarder | 17 from pylib.forwarder import Forwarder |
14 from pylib.valgrind_tools import CreateTool | 18 from pylib.valgrind_tools import CreateTool |
15 # TODO(frankf): Move this to pylib/utils | 19 # TODO(frankf): Move this to pylib/utils |
16 import lighttpd_server | 20 import lighttpd_server |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 break | 181 break |
178 else: | 182 else: |
179 error_msgs.append(error_msg) | 183 error_msgs.append(error_msg) |
180 self._spawning_server.Stop() | 184 self._spawning_server.Stop() |
181 # Wait for 2 seconds then restart. | 185 # Wait for 2 seconds then restart. |
182 time.sleep(2) | 186 time.sleep(2) |
183 if not server_ready: | 187 if not server_ready: |
184 logging.error(';'.join(error_msgs)) | 188 logging.error(';'.join(error_msgs)) |
185 raise Exception('Can not start the test spawner server.') | 189 raise Exception('Can not start the test spawner server.') |
186 self._PushTestServerPortInfoToDevice() | 190 self._PushTestServerPortInfoToDevice() |
OLD | NEW |