Chromium Code Reviews| 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 b83cd379baae5e979335527bdad5ba6e59759ba0..a97e2657180955f4e0474bffff1a5af7873445d5 100644 |
| --- a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py |
| +++ b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http.py |
| @@ -44,6 +44,7 @@ class ApacheHTTP(server_base.ServerBase): |
| # We use the name "httpd" instead of "apache" to make our paths (e.g. the pid file: /tmp/WebKit/httpd.pid) |
| # match old-run-webkit-tests: https://bugs.webkit.org/show_bug.cgi?id=63956 |
| self._name = 'httpd' |
| + self._log_prefixes = ('access_log', 'error_log') |
|
Dirk Pranke
2014/07/23 23:21:11
The fact that this line was missing means that we
|
| self._mappings = [{'port': 8000}, |
| {'port': 8080}, |
| {'port': 8443, 'sslcert': True}] |
| @@ -61,8 +62,8 @@ class ApacheHTTP(server_base.ServerBase): |
| mime_types_path = self._filesystem.join(test_dir, "http", "conf", "mime.types") |
| cert_file = self._filesystem.join(test_dir, "http", "conf", "webkit-httpd.pem") |
| - access_log = self._filesystem.join(output_dir, "access_log.txt") |
| - error_log = self._filesystem.join(output_dir, "error_log.txt") |
| + self._access_log = self._filesystem.join(output_dir, "access_log.txt") |
| + self._error_log = self._filesystem.join(output_dir, "error_log.txt") |
| self._is_win = self._port_obj.host.platform.is_win() |
| @@ -73,8 +74,8 @@ class ApacheHTTP(server_base.ServerBase): |
| '-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' % access_log, |
| - '-c', 'ErrorLog "%s"' % error_log, |
| + '-c', 'CustomLog "%s" common' % self._access_log, |
| + '-c', 'ErrorLog "%s"' % self._error_log, |
| '-c', 'PidFile %s' % self._pid_file, |
| '-c', 'SSLCertificateFile "%s"' % cert_file, |
| ] |
| @@ -125,7 +126,7 @@ class ApacheHTTP(server_base.ServerBase): |
| def _spawn_process(self): |
| _log.debug('Starting %s server, cmd="%s"' % (self._name, str(self._start_cmd))) |
| - self._process = self._executive.popen(self._start_cmd) |
| + self._process = self._executive.popen(self._start_cmd, stderr=self._executive.PIPE) |
|
Dirk Pranke
2014/07/23 23:21:11
This being missing meant that stderr logging was g
|
| if self._process.returncode is not None: |
| retval = self._process.returncode |
| err = self._process.stderr.read() |
| @@ -135,6 +136,7 @@ class ApacheHTTP(server_base.ServerBase): |
| # For some reason apache isn't guaranteed to have created the pid file before |
| # the process exits, so we wait a little while longer. |
| if not self._wait_for_action(lambda: self._filesystem.exists(self._pid_file)): |
| + self._dump_logs() |
| raise server_base.ServerError('Failed to start %s: no pid file found' % self._name) |
| return int(self._filesystem.read_text_file(self._pid_file)) |