Index: Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py |
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py |
index c28f4d56c0fabd32864b1cad463fde14a86e0806..1fd140363cda4d6ee03427eca74f13ab24e8a435 100644 |
--- a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py |
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py |
@@ -39,6 +39,7 @@ _log = logging.getLogger(__name__) |
class ApacheHTTP(server_base.ServerBase): |
+ |
def __init__(self, port_obj, output_dir, additional_dirs, number_of_servers): |
super(ApacheHTTP, self).__init__(port_obj, output_dir) |
# We use the name "httpd" instead of "apache" to make our paths (e.g. the pid file: /tmp/WebKit/httpd.pid) |
@@ -56,36 +57,36 @@ class ApacheHTTP(server_base.ServerBase): |
server_root = self._filesystem.dirname(self._filesystem.dirname(executable)) |
test_dir = self._port_obj.layout_tests_dir() |
- document_root = self._filesystem.join(test_dir, "http", "tests") |
- js_test_resources_dir = self._filesystem.join(test_dir, "resources") |
- media_resources_dir = self._filesystem.join(test_dir, "media") |
- mime_types_path = self._filesystem.join(test_dir, "http", "conf", "mime.types") |
- cert_file = self._filesystem.join(test_dir, "http", "conf", "webkit-httpd.pem") |
+ document_root = self._filesystem.join(test_dir, 'http', 'tests') |
+ js_test_resources_dir = self._filesystem.join(test_dir, 'resources') |
+ media_resources_dir = self._filesystem.join(test_dir, 'media') |
+ mime_types_path = self._filesystem.join(test_dir, 'http', 'conf', 'mime.types') |
+ cert_file = self._filesystem.join(test_dir, 'http', 'conf', 'webkit-httpd.pem') |
- self._access_log_path = self._filesystem.join(output_dir, "access_log.txt") |
- self._error_log_path = self._filesystem.join(output_dir, "error_log.txt") |
+ self._access_log_path = self._filesystem.join(output_dir, 'access_log.txt') |
+ self._error_log_path = self._filesystem.join(output_dir, 'error_log.txt') |
self._is_win = self._port_obj.host.platform.is_win() |
start_cmd = [executable, |
- '-f', '%s' % self._port_obj.path_to_apache_config_file(), |
- '-C', 'ServerRoot "%s"' % server_root, |
- '-C', 'DocumentRoot "%s"' % document_root, |
- '-c', 'Alias /js-test-resources "%s"' % js_test_resources_dir, |
- '-c', 'Alias /media-resources "%s"' % media_resources_dir, |
- '-c', 'TypesConfig "%s"' % mime_types_path, |
- '-c', 'CustomLog "%s" common' % self._access_log_path, |
- '-c', 'ErrorLog "%s"' % self._error_log_path, |
- '-c', 'PidFile %s' % self._pid_file, |
- '-c', 'SSLCertificateFile "%s"' % cert_file, |
- ] |
+ '-f', '%s' % self._port_obj.path_to_apache_config_file(), |
+ '-C', 'ServerRoot "%s"' % server_root, |
+ '-C', 'DocumentRoot "%s"' % document_root, |
+ '-c', 'Alias /js-test-resources "%s"' % js_test_resources_dir, |
+ '-c', 'Alias /media-resources "%s"' % media_resources_dir, |
+ '-c', 'TypesConfig "%s"' % mime_types_path, |
+ '-c', 'CustomLog "%s" common' % self._access_log_path, |
+ '-c', 'ErrorLog "%s"' % self._error_log_path, |
+ '-c', 'PidFile %s' % self._pid_file, |
+ '-c', 'SSLCertificateFile "%s"' % cert_file, |
+ ] |
if self._is_win: |
- start_cmd += ['-c', "ThreadsPerChild %d" % (self._number_of_servers * 2)] |
+ start_cmd += ['-c', 'ThreadsPerChild %d' % (self._number_of_servers * 2)] |
else: |
- start_cmd += ['-c', "StartServers %d" % self._number_of_servers, |
- '-c', "MinSpareServers %d" % self._number_of_servers, |
- '-c', "MaxSpareServers %d" % self._number_of_servers, |
+ start_cmd += ['-c', 'StartServers %d' % self._number_of_servers, |
+ '-c', 'MinSpareServers %d' % self._number_of_servers, |
+ '-c', 'MaxSpareServers %d' % self._number_of_servers, |
'-C', 'User "%s"' % os.environ.get('USERNAME', os.environ.get('USER', '')), |
'-k', 'start'] |
@@ -105,22 +106,22 @@ class ApacheHTTP(server_base.ServerBase): |
for mapping in self._mappings: |
port = mapping['port'] |
- start_cmd += ['-C', "Listen 127.0.0.1:%d" % port] |
+ start_cmd += ['-C', 'Listen 127.0.0.1:%d' % port] |
# We listen to both IPv4 and IPv6 loop-back addresses, but ignore |
# requests to 8000 from random users on network. |
# See https://bugs.webkit.org/show_bug.cgi?id=37104 |
if enable_ipv6: |
- start_cmd += ['-C', "Listen [::1]:%d" % port] |
+ start_cmd += ['-C', 'Listen [::1]:%d' % port] |
if additional_dirs: |
self._start_cmd = start_cmd |
for alias, path in additional_dirs.iteritems(): |
start_cmd += ['-c', 'Alias %s "%s"' % (alias, path), |
- # Disable CGI handler for additional dirs. |
- '-c', '<Location %s>' % alias, |
- '-c', 'RemoveHandler .cgi .pl', |
- '-c', '</Location>'] |
+ # Disable CGI handler for additional dirs. |
+ '-c', '<Location %s>' % alias, |
+ '-c', 'RemoveHandler .cgi .pl', |
+ '-c', '</Location>'] |
self._start_cmd = start_cmd |