Bug 1432813 - Remove warning on "./mach marionette-test". r?maja_zf draft
authorAndreas Tolfsen <ato@sny.no>
Wed, 24 Jan 2018 19:13:34 +0000
changeset 724241 6cc76734c3d42f0e36dd29ab075489c62b2ea9d3
parent 724080 0e62eb7804c00c0996a9bdde5350328a384fb7af
child 747115 f3899e6b0bbd28fde2e41f44fb510723ac6cc799
push id96708
push userbmo:ato@sny.no
push dateWed, 24 Jan 2018 19:15:43 +0000
reviewersmaja_zf
bugs1432813
milestone60.0a1
Bug 1432813 - Remove warning on "./mach marionette-test". r?maja_zf It is not possible to hook "./mach test" up to "./mach marionette test" because the test flavours system does not allow delegation to subcommands. Users find it annoying that using "./mach test" causes a warning to be emitted. Considering we will not be able to remove "./mach marionette-test", this patch instead quenches the warning. MozReview-Commit-ID: Ia0ukcN3JMJ
testing/marionette/mach_commands.py
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -65,30 +65,24 @@ def run_marionette(tests, binary=None, t
     failed = MarionetteHarness(MarionetteTestRunner, args=vars(args)).run()
     if failed > 0:
         return 1
     else:
         return 0
 
 
 @CommandProvider
-class MachCommands(MachCommandBase):
-
-    """Deprecated in favour of ./mach marionette <subcommand>."""
-
+class MarionetteTest(MachCommandBase):
     @Command("marionette-test",
              category="testing",
              description="Remote control protocol to Gecko, used for functional UI tests and browser automation.",
              conditions=[is_firefox_or_android],
              parser=create_parser_tests,
              )
-    def run_marionette_test(self, tests, **kwargs):
-        print("warning: ./mach marionette-test is deprecated; "
-              "please use ./mach marionette test", file=sys.stderr)
-
+    def marionette_test(self, tests, **kwargs):
         if "test_objects" in kwargs:
             tests = []
             for obj in kwargs["test_objects"]:
                 tests.append(obj["file_relpath"])
             del kwargs["test_objects"]
 
         if not kwargs.get("binary") and conditions.is_firefox(self):
             kwargs["binary"] = self.get_binary_path("app")