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

--HG--
extra : rebase_source : c62c13f9055178f1b3eb8f7e58b6f0fc01d06b03
This commit is contained in:
Andreas Tolfsen 2018-01-24 19:13:34 +00:00
Родитель 7e6e71746a
Коммит f2d5d9eace
1 изменённых файлов: 2 добавлений и 8 удалений

Просмотреть файл

@ -70,20 +70,14 @@ def run_marionette(tests, binary=None, topsrcdir=None, **kwargs):
@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"]: