from webkitpy.layout_tests.port import driver
from webkitpy.layout_tests.port import server_process
from webkitpy.layout_tests.port.factory import PortFactory
-from webkitpy.layout_tests.servers import apache_http_server
-from webkitpy.layout_tests.servers import http_server
-from webkitpy.layout_tests.servers import websocket_server
+from webkitpy.layout_tests.servers import apache_http
+from webkitpy.layout_tests.servers import lighttpd
+from webkitpy.layout_tests.servers import pywebsocket
_log = logging.getLogger(__name__)
return 'wdiff is not installed; please install it to generate word-by-word diffs.'
def check_httpd(self):
- if self._uses_apache():
- httpd_path = self._path_to_apache()
+ if self.uses_apache():
+ httpd_path = self.path_to_apache()
else:
- httpd_path = self._path_to_lighttpd()
+ httpd_path = self.path_to_lighttpd()
try:
server_name = self._filesystem.basename(httpd_path)
be the case when the tests aren't run on the host platform."""
return False
- def start_http_server(self, additional_dirs=None, number_of_servers=None):
+ def start_http_server(self, additional_dirs=None, number_of_drivers=None):
"""Start a web server. Raise an error if it can't start or is already running.
Ports can stub this out if they don't need a web server to be running."""
assert not self._http_server, 'Already running an http server.'
- if self._uses_apache():
- server = apache_http_server.LayoutTestApacheHttpd(self, self.results_directory(), additional_dirs=additional_dirs, number_of_servers=number_of_servers)
+ if self.uses_apache():
+ server = apache_http.ApacheHTTP(self, self.results_directory(), additional_dirs=additional_dirs, number_of_servers=(number_of_drivers * 4))
else:
- server = http_server.Lighttpd(self, self.results_directory(), additional_dirs=additional_dirs, number_of_servers=number_of_servers)
+ server = lighttpd.Lighttpd(self, self.results_directory(), additional_dirs=additional_dirs)
server.start()
self._http_server = server
Ports can stub this out if they don't need a websocket server to be running."""
assert not self._websocket_server, 'Already running a websocket server.'
- server = websocket_server.PyWebSocket(self, self.results_directory())
+ server = pywebsocket.PyWebSocket(self, self.results_directory())
server.start()
self._websocket_server = server
def clobber_old_port_specific_results(self):
pass
- #
- # PROTECTED ROUTINES
- #
- # The routines below should only be called by routines in this class
- # or any of its subclasses.
- #
-
- def _uses_apache(self):
+ def uses_apache(self):
return True
# FIXME: This does not belong on the port object.
@memoized
- def _path_to_apache(self):
+ def path_to_apache(self):
"""Returns the full path to the apache binary.
This is needed only by ports that use the apache_http_server module."""
- raise NotImplementedError('Port._path_to_apache')
+ raise NotImplementedError('Port.path_to_apache')
+
+ def path_to_apache_config_file(self):
+ """Returns the full path to the apache configuration file.
+
+ If the WEBKIT_HTTP_SERVER_CONF_PATH environment variable is set, its
+ contents will be used instead.
+
+ This is needed only by ports that use the apache_http_server module."""
+ config_file_from_env = os.environ.get('WEBKIT_HTTP_SERVER_CONF_PATH')
+ if config_file_from_env:
+ if not self._filesystem.exists(config_file_from_env):
+ raise IOError('%s was not found on the system' % config_file_from_env)
+ return config_file_from_env
+
+ config_file_name = self._apache_config_file_name_for_platform(sys.platform)
+ return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', config_file_name)
+
+ def path_to_lighttpd(self):
+ """Returns the path to the LigHTTPd binary.
+
+ This is needed only by ports that use the http_server.py module."""
+ raise NotImplementedError('Port._path_to_lighttpd')
+
+ def path_to_lighttpd_modules(self):
+ """Returns the path to the LigHTTPd modules directory.
+
+ This is needed only by ports that use the http_server.py module."""
+ raise NotImplementedError('Port._path_to_lighttpd_modules')
+
+ def path_to_lighttpd_php(self):
+ """Returns the path to the LigHTTPd PHP executable.
+
+ This is needed only by ports that use the http_server.py module."""
+ raise NotImplementedError('Port._path_to_lighttpd_php')
+
+
+ #
+ # PROTECTED ROUTINES
+ #
+ # The routines below should only be called by routines in this class
+ # or any of its subclasses.
+ #
# FIXME: This belongs on some platform abstraction instead of Port.
def _is_redhat_based(self):
return self._filesystem.exists('/etc/debian_version')
def _apache_version(self):
- config = self._executive.run_command([self._path_to_apache(), '-v'])
+ config = self._executive.run_command([self.path_to_apache(), '-v'])
return re.sub(r'(?:.|\n)*Server version: Apache/(\d+\.\d+)(?:.|\n)*', r'\1', config)
# We pass sys_platform into this method to make it easy to unit test.
# All platforms use apache2 except for CYGWIN (and Mac OS X Tiger and prior, which we no longer support).
return "apache2-httpd.conf"
- def _path_to_apache_config_file(self):
- """Returns the full path to the apache configuration file.
-
- If the WEBKIT_HTTP_SERVER_CONF_PATH environment variable is set, its
- contents will be used instead.
-
- This is needed only by ports that use the apache_http_server module."""
- config_file_from_env = os.environ.get('WEBKIT_HTTP_SERVER_CONF_PATH')
- if config_file_from_env:
- if not self._filesystem.exists(config_file_from_env):
- raise IOError('%s was not found on the system' % config_file_from_env)
- return config_file_from_env
-
- config_file_name = self._apache_config_file_name_for_platform(sys.platform)
- return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', config_file_name)
-
def _path_to_driver(self, configuration=None):
"""Returns the full path to the test driver."""
return self._build_path(self.driver_name())
This is likely used only by diff_image()"""
return self._build_path('image_diff')
- def _path_to_lighttpd(self):
- """Returns the path to the LigHTTPd binary.
-
- This is needed only by ports that use the http_server.py module."""
- raise NotImplementedError('Port._path_to_lighttpd')
-
- def _path_to_lighttpd_modules(self):
- """Returns the path to the LigHTTPd modules directory.
-
- This is needed only by ports that use the http_server.py module."""
- raise NotImplementedError('Port._path_to_lighttpd_modules')
-
- def _path_to_lighttpd_php(self):
- """Returns the path to the LigHTTPd PHP executable.
-
- This is needed only by ports that use the http_server.py module."""
- raise NotImplementedError('Port._path_to_lighttpd_php')
-
@memoized
def _path_to_wdiff(self):
"""Returns the full path to the wdiff binary, or None if it is not available.
VirtualTestSuite('threaded',
'transitions',
['--enable-threaded-compositing']),
- VirtualTestSuite('legacy-animations-engine',
- 'animations',
- ['--disable-web-animations-css']),
- VirtualTestSuite('legacy-animations-engine',
- 'transitions',
- ['--disable-web-animations-css']),
VirtualTestSuite('stable',
'webexposed',
['--stable-release-mode']),
VirtualTestSuite('serviceworker',
'http/tests/serviceworker',
['--enable-service-worker']),
+ VirtualTestSuite('targetedstylerecalc',
+ 'fast/css/invalidation',
+ ['--enable-targeted-style-recalc']),
+ VirtualTestSuite('stable',
+ 'http/tests/websocket',
+ ['--stable-release-mode']),
]
@memoized