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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 from webkitpy.common.webkit_finder import WebKitFinder | 59 from webkitpy.common.webkit_finder import WebKitFinder |
60 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory | 60 from webkitpy.layout_tests.layout_package.bot_test_expectations import BotTestEx
pectationsFactory |
61 from webkitpy.layout_tests.models import test_run_results | 61 from webkitpy.layout_tests.models import test_run_results |
62 from webkitpy.layout_tests.models.test_configuration import TestConfiguration | 62 from webkitpy.layout_tests.models.test_configuration import TestConfiguration |
63 from webkitpy.layout_tests.port import config as port_config | 63 from webkitpy.layout_tests.port import config as port_config |
64 from webkitpy.layout_tests.port import driver | 64 from webkitpy.layout_tests.port import driver |
65 from webkitpy.layout_tests.port import server_process | 65 from webkitpy.layout_tests.port import server_process |
66 from webkitpy.layout_tests.port.factory import PortFactory | 66 from webkitpy.layout_tests.port.factory import PortFactory |
67 from webkitpy.layout_tests.servers import apache_http | 67 from webkitpy.layout_tests.servers import apache_http |
68 from webkitpy.layout_tests.servers import pywebsocket | 68 from webkitpy.layout_tests.servers import pywebsocket |
| 69 from skypy.skyserver import SkyServer |
69 | 70 |
70 _log = logging.getLogger(__name__) | 71 _log = logging.getLogger(__name__) |
71 | 72 |
72 | 73 |
73 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl
y like other webkit ports. | 74 # FIXME: This class should merge with WebKitPort now that Chromium behaves mostl
y like other webkit ports. |
74 class Port(object): | 75 class Port(object): |
75 """Abstract class for Port-specific hooks for the layout_test package.""" | 76 """Abstract class for Port-specific hooks for the layout_test package.""" |
76 | 77 |
77 # Subclasses override this. This should indicate the basic implementation | 78 # Subclasses override this. This should indicate the basic implementation |
78 # part of the port name, e.g., 'mac', 'win', 'gtk'; there is probably (?) | 79 # part of the port name, e.g., 'mac', 'win', 'gtk'; there is probably (?) |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 | 1087 |
1087 def requires_http_server(self): | 1088 def requires_http_server(self): |
1088 """Does the port require an HTTP server for running tests? This could | 1089 """Does the port require an HTTP server for running tests? This could |
1089 be the case when the tests aren't run on the host platform.""" | 1090 be the case when the tests aren't run on the host platform.""" |
1090 return True | 1091 return True |
1091 | 1092 |
1092 def _dart_packages_root(self): | 1093 def _dart_packages_root(self): |
1093 return self._build_path('gen/dart-pkg/packages') | 1094 return self._build_path('gen/dart-pkg/packages') |
1094 | 1095 |
1095 def server_command_line(self): | 1096 def server_command_line(self): |
1096 path = (self._options.path_to_server or | 1097 # TODO(eseidel): Shouldn't this just use skyserver.py? |
1097 self.path_from_chromium_base('out', 'downloads', 'sky_server')) | 1098 path = (self._options.path_to_server or SkyServer.sky_server_path()) |
1098 return [ | 1099 return [ |
1099 path, | 1100 path, |
1100 '-t', self.get_option('configuration'), | 1101 '-t', self.get_option('configuration'), |
1101 self.path_from_chromium_base(), | 1102 self.path_from_chromium_base(), |
1102 '8000', | 1103 '8000', |
1103 self._dart_packages_root() | 1104 self._dart_packages_root() |
1104 ] | 1105 ] |
1105 | 1106 |
1106 def start_http_server(self, additional_dirs, number_of_drivers): | 1107 def start_http_server(self, additional_dirs, number_of_drivers): |
1107 """Start a web server. Raise an error if it can't start or is already ru
nning. | 1108 """Start a web server. Raise an error if it can't start or is already ru
nning. |
1108 | 1109 |
1109 Ports can stub this out if they don't need a web server to be running.""
" | 1110 Ports can stub this out if they don't need a web server to be running.""
" |
1110 assert not self._http_server, 'Already running an http server.' | 1111 assert not self._http_server, 'Already running an http server.' |
1111 subprocess.call(self.path_to_script('download_sky_server')) | |
1112 self._http_server = subprocess.Popen(self.server_command_line()) | 1112 self._http_server = subprocess.Popen(self.server_command_line()) |
1113 | 1113 |
1114 def start_websocket_server(self): | 1114 def start_websocket_server(self): |
1115 """Start a web server. Raise an error if it can't start or is already ru
nning. | 1115 """Start a web server. Raise an error if it can't start or is already ru
nning. |
1116 | 1116 |
1117 Ports can stub this out if they don't need a websocket server to be runn
ing.""" | 1117 Ports can stub this out if they don't need a websocket server to be runn
ing.""" |
1118 assert not self._websocket_server, 'Already running a websocket server.' | 1118 assert not self._websocket_server, 'Already running a websocket server.' |
1119 | 1119 |
1120 server = pywebsocket.PyWebSocket(self, self.results_directory()) | 1120 server = pywebsocket.PyWebSocket(self, self.results_directory()) |
1121 server.start() | 1121 server.start() |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 | 1777 |
1778 class PhysicalTestSuite(object): | 1778 class PhysicalTestSuite(object): |
1779 def __init__(self, base, args): | 1779 def __init__(self, base, args): |
1780 self.name = base | 1780 self.name = base |
1781 self.base = base | 1781 self.base = base |
1782 self.args = args | 1782 self.args = args |
1783 self.tests = set() | 1783 self.tests = set() |
1784 | 1784 |
1785 def __repr__(self): | 1785 def __repr__(self): |
1786 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) | 1786 return "PhysicalTestSuite('%s', '%s', %s)" % (self.name, self.base, self
.args) |
OLD | NEW |