[Flatpak] Remove now unnecessary 'hacks' for running tests
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 08:15:57 +0000 (08:15 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jul 2018 08:15:57 +0000 (08:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187608

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-24
Reviewed by Philippe Normand.

We used to need to not share X11 with the sandbox when running tests
but it is not needed anymore as we do not mount `/tmp` on `/tmp` in the
sandbox (we mount it on `/run/host/tmp` now).

This has the advantage of making running the MiniBrowser to display test
results working again.

* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak._cleanup_faltpak_args_for_tests_if_needed): Deleted.

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

Tools/ChangeLog
Tools/flatpak/flatpakutils.py

index b07825c..b92ce28 100644 (file)
@@ -1,3 +1,22 @@
+2018-07-24  Thibault Saunier  <tsaunier@igalia.com>
+
+        [Flatpak] Remove now unnecessary 'hacks' for running tests
+        https://bugs.webkit.org/show_bug.cgi?id=187608
+
+        Reviewed by Philippe Normand.
+
+        We used to need to not share X11 with the sandbox when running tests
+        but it is not needed anymore as we do not mount `/tmp` on `/tmp` in the
+        sandbox (we mount it on `/run/host/tmp` now).
+
+        This has the advantage of making running the MiniBrowser to display test
+        results working again.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.clean_args):
+        (WebkitFlatpak.run_in_sandbox):
+        (WebkitFlatpak._cleanup_faltpak_args_for_tests_if_needed): Deleted.
+
 2018-07-23  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         webkitpy.port.server_process_unittest.TestServerProcess.test_basic failed on Windows Python
index 973b2b1..a2d3f5b 100644 (file)
@@ -649,16 +649,6 @@ class WebkitFlatpak:
 
         return True
 
-    def _cleanup_faltpak_args_for_tests_if_needed(self, args):
-        if not args or not args[0].endswith('run-webkit-tests'):
-            return self.finish_args
-
-        # We are going to run our own Xvfb server in the sandbox
-        unwanted_args = ["--socket=x11"]
-        finish_args = [e for e in self.finish_args if e not in unwanted_args]
-
-        return finish_args
-
     def run_in_sandbox(self, *args, **kwargs):
         cwd = kwargs.pop("cwd", None)
         stdout = kwargs.pop("stdout", sys.stdout)
@@ -700,8 +690,7 @@ class WebkitFlatpak:
             for envvar, value in forwarded.items():
                 flatpak_command.append("--env=%s=%s" % (envvar, value))
 
-            finish_args = self._cleanup_faltpak_args_for_tests_if_needed(args)
-            flatpak_command += finish_args + extra_flatpak_args + [self.flatpak_build_path]
+            flatpak_command += self.finish_args + extra_flatpak_args + [self.flatpak_build_path]
 
             shell_string = ""
             if args: