REGRESSION(r263625): [WPE][GTK] MiniBrowser output no longer includes stderr and...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jun 2020 09:38:13 +0000 (09:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Jun 2020 09:38:13 +0000 (09:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=213696

Patch by Philippe Normand <pnormand@igalia.com> on 2020-06-29
Reviewed by Žan Doberšek.

This patch adds a new optional argument to Executive.run_command() to control stdout output.
By default the subprocess.PIPE value is used, to keep backward compatibility. Set the stdout
argument to None to display the output on the terminal tty.

The GTK and WPE run_minibrowser() implementations now use this new argument, along with
setting return_stderr to False to indicate we also want stderr displayed on the terminal
tty.

* Scripts/webkitpy/common/system/abstractexecutive.py:
(AbstractExecutive.run_command):
* Scripts/webkitpy/common/system/executive.py:
(Executive.run_command):
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.run_command):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.run_minibrowser):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.run_minibrowser):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@263649 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/common/system/abstractexecutive.py
Tools/Scripts/webkitpy/common/system/executive.py
Tools/Scripts/webkitpy/common/system/executive_mock.py
Tools/Scripts/webkitpy/port/gtk.py
Tools/Scripts/webkitpy/port/wpe.py

index 0a6101d..aa1ae47 100644 (file)
@@ -1,5 +1,31 @@
 2020-06-29  Philippe Normand  <pnormand@igalia.com>
 
+        REGRESSION(r263625): [WPE][GTK] MiniBrowser output no longer includes stderr and stdout
+        https://bugs.webkit.org/show_bug.cgi?id=213696
+
+        Reviewed by Žan Doberšek.
+
+        This patch adds a new optional argument to Executive.run_command() to control stdout output.
+        By default the subprocess.PIPE value is used, to keep backward compatibility. Set the stdout
+        argument to None to display the output on the terminal tty.
+
+        The GTK and WPE run_minibrowser() implementations now use this new argument, along with
+        setting return_stderr to False to indicate we also want stderr displayed on the terminal
+        tty.
+
+        * Scripts/webkitpy/common/system/abstractexecutive.py:
+        (AbstractExecutive.run_command):
+        * Scripts/webkitpy/common/system/executive.py:
+        (Executive.run_command):
+        * Scripts/webkitpy/common/system/executive_mock.py:
+        (MockExecutive.run_command):
+        * Scripts/webkitpy/port/gtk.py:
+        (GtkPort.run_minibrowser):
+        * Scripts/webkitpy/port/wpe.py:
+        (WPEPort.run_minibrowser):
+
+2020-06-29  Philippe Normand  <pnormand@igalia.com>
+
         REGRESSION(r263625): run-minibrowser --debug/--release options gone
         https://bugs.webkit.org/show_bug.cgi?id=213697
 
index 1582468..f2cc21e 100644 (file)
@@ -109,7 +109,7 @@ class AbstractExecutive(object):
         args = self._stringify_args(args)
         return unicode_compatibility.decode_if_necessary(unicode_compatibility.encode_if_necessary(' '.join(args), 'unicode_escape'))
 
-    def run_command(self, args, cwd=None, env=None, input=None, error_handler=None, ignore_errors=False,
+    def run_command(self, args, cwd=None, env=None, input=None, stdout=None, error_handler=None, ignore_errors=False,
         return_exit_code=False, return_stderr=True, decode_output=True):
         raise NotImplementedError('subclasses must implement')
 
index 869e04a..eb21ece 100644 (file)
@@ -383,6 +383,7 @@ class Executive(AbstractExecutive):
                     cwd=None,
                     env=None,
                     input=None,
+                    stdout=subprocess.PIPE,
                     error_handler=None,
                     ignore_errors=False,
                     return_exit_code=False,
@@ -397,7 +398,7 @@ class Executive(AbstractExecutive):
 
         process = self.popen(args,
                              stdin=stdin,
-                             stdout=self.PIPE,
+                             stdout=stdout,
                              stderr=stderr,
                              cwd=cwd,
                              env=env,
index 3e6ba7b..83f2983 100644 (file)
@@ -117,6 +117,7 @@ class MockExecutive(object):
                     args,
                     cwd=None,
                     input=None,
+                    stdout=None,
                     error_handler=None,
                     ignore_errors=False,
                     return_exit_code=False,
index cafc4be..758ed9a 100644 (file)
@@ -269,4 +269,4 @@ class GtkPort(Port):
         command = [miniBrowser]
         if self._should_use_jhbuild():
             command = self._jhbuild_wrapper + command
-        return self._executive.run_command(command + args, cwd=self.webkit_base())
+        return self._executive.run_command(command + args, cwd=self.webkit_base(), stdout=None, return_stderr=False, decode_output=False)
index 8155cc0..9f868c9 100644 (file)
@@ -143,4 +143,4 @@ class WPEPort(Port):
         command = [miniBrowser]
         if self._should_use_jhbuild():
             command = self._jhbuild_wrapper + command
-        return self._executive.run_command(command + args, cwd=self.webkit_base())
+        return self._executive.run_command(command + args, cwd=self.webkit_base(), stdout=None, return_stderr=False, decode_output=False)