Modified: trunk/Tools/ChangeLog (220718 => 220719)
--- trunk/Tools/ChangeLog 2017-08-14 22:03:56 UTC (rev 220718)
+++ trunk/Tools/ChangeLog 2017-08-14 22:38:41 UTC (rev 220719)
@@ -1,3 +1,19 @@
+2017-08-14 Youenn Fablet <[email protected]>
+
+ WPT server should be able to do logging even if its output folder is not created at launch time
+ https://bugs.webkit.org/show_bug.cgi?id=175543
+
+ Reviewed by Alexey Proskuryakov.
+
+ Removing no longer used stdout/stderr member variables.
+ Creating if needed the output folder so that we can create WPT server output log folder at WPT server launch time.
+
+ * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
+ (WebPlatformTestServer.__init__):
+ (WebPlatformTestServer._prepare_config):
+ (WebPlatformTestServer._spawn_process):
+ (WebPlatformTestServer._stop_running_server):
+
2017-08-14 Daniel Bates <[email protected]>
webkit-patch: Passing --no-review should submit patch to EWS by default
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py (220718 => 220719)
--- trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py 2017-08-14 22:03:56 UTC (rev 220718)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py 2017-08-14 22:38:41 UTC (rev 220719)
@@ -88,8 +88,6 @@
self._pid_file = self._filesystem.join(self._runtime_path, '%s.pid' % self._name)
self._servers_file = self._filesystem.join(self._runtime_path, '%s_servers.json' % (self._name))
- self._stdout_data = None
- self._stderr_data = None
self._filesystem = port_obj.host.filesystem
self._layout_root = port_obj.layout_tests_dir()
self._doc_root = self._filesystem.join(self._layout_root, doc_root(port_obj))
@@ -143,18 +141,13 @@
self._filesystem.remove(config_wpt_filename)
def _prepare_config(self):
- if self._filesystem.exists(self._output_dir):
- self._output_log_path = self._filesystem.join(self._output_dir, self._log_file_name)
- self._wsout = self._filesystem.open_text_file_for_writing(self._output_log_path)
+ self._filesystem.maybe_make_directory(self._output_dir)
+ self._output_log_path = self._filesystem.join(self._output_dir, self._log_file_name)
+ self._wsout = self._filesystem.open_text_file_for_writing(self._output_log_path)
self._copy_webkit_test_files()
def _spawn_process(self):
- self._stdout_data = None
- self._stderr_data = None
- if self._wsout:
- self._process = self._executive.popen(self._start_cmd, cwd=self._doc_root_path, shell=False, stdin=self._executive.PIPE, stdout=self._wsout, stderr=self._wsout)
- else:
- self._process = self._executive.popen(self._start_cmd, cwd=self._doc_root_path, shell=False, stdin=self._executive.PIPE, stdout=self._executive.PIPE, stderr=self._executive.STDOUT)
+ self._process = self._executive.popen(self._start_cmd, cwd=self._doc_root_path, shell=False, stdin=self._executive.PIPE, stdout=self._wsout, stderr=self._wsout)
self._filesystem.write_text_file(self._pid_file, str(self._process.pid))
# Wait a second for the server to actually start so that tests do not start until server is running.
@@ -194,7 +187,7 @@
self._clean_webkit_test_files()
if self._process:
- (self._stdout_data, self._stderr_data) = self._process.communicate(input='\n')
+ self._process.communicate(input='\n')
if self._wsout:
self._wsout.close()
self._wsout = None