Bug 1377886 - Don't start Firefox with mach wpt-create, r=AutomatedTester draft
authorJames Graham <james@hoppipolla.co.uk>
Mon, 03 Jul 2017 15:38:10 +0100
changeset 603289 5d3b94c798cf219477154ce145ffe99862a538e6
parent 603265 283debe8155accfec5812c66e33384ce217d02c2
child 603290 0f033fc2433ef563f0ffc0241e8ded4df9c09e2b
push id66724
push userbmo:james@hoppipolla.co.uk
push dateMon, 03 Jul 2017 14:41:45 +0000
reviewersAutomatedTester
bugs1377886
milestone56.0a1
Bug 1377886 - Don't start Firefox with mach wpt-create, r=AutomatedTester This confuses people and isn't needed to update the manifest these days. MozReview-Commit-ID: 4t4zdXLMob5
testing/web-platform/mach_commands.py
--- 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):