--- a/testing/web-platform/mach_commands.py
+++ b/testing/web-platform/mach_commands.py
@@ -276,24 +276,21 @@ testing/web-platform/tests for tests tha
editor = os.environ["EDITOR"]
else:
editor = None
proc = None
if editor:
proc = subprocess.Popen("%s %s" % (editor, path), shell=True)
- if not kwargs["no_run"]:
- p = create_parser_wpt()
- wpt_kwargs = vars(p.parse_args(["--manifest-update", path]))
- context.commands.dispatch("web-platform-tests", context, **wpt_kwargs)
-
if proc:
proc.wait()
+ context.commands.dispatch("wpt-manifest-update", context, {"check_clean": False, "rebuild": False})
+
class WPTManifestUpdater(MozbuildObject):
def run_update(self, check_clean=False, rebuild=False, **kwargs):
import manifestupdate
from wptrunner import wptlogging
logger = wptlogging.setup(kwargs, {"mach": sys.stdout})
wpt_dir = os.path.abspath(os.path.join(self.topsrcdir, 'testing', 'web-platform'))
manifestupdate.update(logger, wpt_dir, check_clean, rebuild)
@@ -308,18 +305,16 @@ def create_parser_reduce():
return wptcommandline.create_parser_reduce()
def create_parser_create():
import argparse
p = argparse.ArgumentParser()
p.add_argument("--no-editor", action="store_true",
help="Don't try to open the test in an editor")
p.add_argument("-e", "--editor", action="store", help="Editor to use")
- p.add_argument("--no-run", action="store_true",
- help="Don't try to update the wpt manifest or open the test in a browser")
p.add_argument("--long-timeout", action="store_true",
help="Test should be given a long timeout (typically 60s rather than 10s, but varies depending on environment)")
p.add_argument("--overwrite", action="store_true",
help="Allow overwriting an existing test file")
p.add_argument("-r", "--reftest", action="store_true",
help="Create a reftest rather than a testharness (js) test"),
p.add_argument("-ref", "--reference", dest="ref", help="Path to the reference file")
p.add_argument("--mismatch", action="store_true",
@@ -392,26 +387,24 @@ class MachCommands(MachCommandBase):
category="testing",
conditions=[conditions.is_firefox],
parser=create_parser_reduce)
def unstable_wpt(self, **params):
return self.unstable_web_platform_tests(**params)
@Command("web-platform-tests-create",
category="testing",
- conditions=[conditions.is_firefox],
parser=create_parser_create)
def create_web_platform_test(self, **params):
self.setup()
wpt_creator = self._spawn(WebPlatformTestsCreator)
wpt_creator.run_create(self._mach_context, **params)
@Command("wpt-create",
category="testing",
- conditions=[conditions.is_firefox],
parser=create_parser_create)
def create_wpt(self, **params):
return self.create_web_platform_test(**params)
@Command("wpt-manifest-update",
category="testing",
parser=create_parser_manifest_update)
def wpt_manifest_update(self, **params):