| OLD | NEW |
| 1 # Copyright (C) 2010 Google Inc. All rights reserved. | 1 # Copyright (C) 2010 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 is_ready = self._helper.stdout.readline() | 1085 is_ready = self._helper.stdout.readline() |
| 1086 if not is_ready.startswith('ready'): | 1086 if not is_ready.startswith('ready'): |
| 1087 _log.error("layout_test_helper failed to be ready") | 1087 _log.error("layout_test_helper failed to be ready") |
| 1088 | 1088 |
| 1089 def requires_http_server(self): | 1089 def requires_http_server(self): |
| 1090 """Does the port require an HTTP server for running tests? This could | 1090 """Does the port require an HTTP server for running tests? This could |
| 1091 be the case when the tests aren't run on the host platform.""" | 1091 be the case when the tests aren't run on the host platform.""" |
| 1092 return True | 1092 return True |
| 1093 | 1093 |
| 1094 def server_command_line(self): | 1094 def server_command_line(self): |
| 1095 path = (self._options.path_to_server or |
| 1096 self.path_from_chromium_base('out', 'downloads', 'sky_server')) |
| 1095 return [ | 1097 return [ |
| 1096 self.path_to_script('sky_server'), | 1098 path, |
| 1097 '-t', self.get_option('configuration'), | 1099 '-t', self.get_option('configuration'), |
| 1098 self.path_from_chromium_base(), | 1100 self.path_from_chromium_base(), |
| 1099 '8000', | 1101 '8000', |
| 1100 ] | 1102 ] |
| 1101 | 1103 |
| 1102 def start_http_server(self, additional_dirs, number_of_drivers): | 1104 def start_http_server(self, additional_dirs, number_of_drivers): |
| 1103 """Start a web server. Raise an error if it can't start or is already ru
nning. | 1105 """Start a web server. Raise an error if it can't start or is already ru
nning. |
| 1104 | 1106 |
| 1105 Ports can stub this out if they don't need a web server to be running.""
" | 1107 Ports can stub this out if they don't need a web server to be running.""
" |
| 1106 assert not self._http_server, 'Already running an http server.' | 1108 assert not self._http_server, 'Already running an http server.' |
| 1109 subprocess.call(self.path_to_script('download_sky_server')) |
| 1107 self._http_server = subprocess.Popen(self.server_command_line()) | 1110 self._http_server = subprocess.Popen(self.server_command_line()) |
| 1108 | 1111 |
| 1109 def start_websocket_server(self): | 1112 def start_websocket_server(self): |
| 1110 """Start a web server. Raise an error if it can't start or is already ru
nning. | 1113 """Start a web server. Raise an error if it can't start or is already ru
nning. |
| 1111 | 1114 |
| 1112 Ports can stub this out if they don't need a websocket server to be runn
ing.""" | 1115 Ports can stub this out if they don't need a websocket server to be runn
ing.""" |
| 1113 assert not self._websocket_server, 'Already running a websocket server.' | 1116 assert not self._websocket_server, 'Already running a websocket server.' |
| 1114 | 1117 |
| 1115 server = pywebsocket.PyWebSocket(self, self.results_directory()) | 1118 server = pywebsocket.PyWebSocket(self, self.results_directory()) |
| 1116 server.start() | 1119 server.start() |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1762 | 1765 |
| 1763 class PhysicalTestSuite(object): | 1766 class PhysicalTestSuite(object): |
| 1764 def __init__(self, base, args): | 1767 def __init__(self, base, args): |
| 1765 self.name = base | 1768 self.name = base |
| 1766 self.base = base | 1769 self.base = base |
| 1767 self.args = args | 1770 self.args = args |
| 1768 self.tests = set() | 1771 self.tests = set() |
| 1769 | 1772 |
| 1770 def __repr__(self): | 1773 def __repr__(self): |
| 1771 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) | 1774 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) |
| OLD | NEW |