Title: [234144] trunk/Tools
Revision
234144
Author
[email protected]
Date
2018-07-24 07:40:47 -0700 (Tue, 24 Jul 2018)

Log Message

[Flatpak] Avoid consuming unknown arguments in flatpak wrapper
https://bugs.webkit.org/show_bug.cgi?id=187951

When running run-webkit-tests --wpe --debug, it was observed that
both self.platform != 'wpe' and self.debug != True. This turned
out to be because of the "args" argument consuming the remainder
of future arguments that came after it. Since the first argument
to load_from_args was the test script to run, it would end up
never processing the other arguments supplied to the wrapper
script.

Tested this by rebuilding GTK in debug mode, running the
minibrowser with various extra options, and running some tests
with various extra options.

Reviewed by Michael Catanzaro.

* flatpak/flatpakutils.py:
(WebkitFlatpak.load_from_args):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (234143 => 234144)


--- trunk/Tools/ChangeLog	2018-07-24 13:22:03 UTC (rev 234143)
+++ trunk/Tools/ChangeLog	2018-07-24 14:40:47 UTC (rev 234144)
@@ -1,3 +1,25 @@
+2018-07-24  Charlie Turner  <[email protected]>
+
+        [Flatpak] Avoid consuming unknown arguments in flatpak wrapper
+        https://bugs.webkit.org/show_bug.cgi?id=187951
+
+        When running run-webkit-tests --wpe --debug, it was observed that
+        both self.platform != 'wpe' and self.debug != True. This turned
+        out to be because of the "args" argument consuming the remainder
+        of future arguments that came after it. Since the first argument
+        to load_from_args was the test script to run, it would end up
+        never processing the other arguments supplied to the wrapper
+        script.
+
+        Tested this by rebuilding GTK in debug mode, running the
+        minibrowser with various extra options, and running some tests
+        with various extra options.
+
+        Reviewed by Michael Catanzaro.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.load_from_args):
+
 2018-07-24  Thibault Saunier  <[email protected]>
 
         [Flatpak] Remove now unnecessary 'hacks' for running tests

Modified: trunk/Tools/flatpak/flatpakutils.py (234143 => 234144)


--- trunk/Tools/flatpak/flatpakutils.py	2018-07-24 13:22:03 UTC (rev 234143)
+++ trunk/Tools/flatpak/flatpakutils.py	2018-07-24 14:40:47 UTC (rev 234144)
@@ -504,9 +504,6 @@
         general.add_argument("-y", "--assumeyes",
                             help="Automatically answer yes for all questions.",
                             action=""
-        general.add_argument("args",
-                            nargs=argparse.REMAINDER,
-                            help="Arguments passed when starting %s" % self.name)
         general.add_argument('--avalaible', action='', dest="check_avalaible", help='Check if required dependencies are avalaible.'),
 
         debugoptions = parser.add_argument_group("Debugging")
@@ -521,7 +518,7 @@
         general.add_argument("--clean", dest="clean", action=""
             help="Clean previous builds and restart from scratch")
 
-        parser.parse_args(args=args, namespace=self)
+        _, self.args = parser.parse_known_args(args=args, namespace=self)
 
         return self
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to