Bug 1441019 - Remove "./mach marionette doc" command. r?whimboo
This removes the "./mach marionette doc" command in favour of the
Sphinx-powered "./mach doc".
MozReview-Commit-ID: IODqDR4O1Dr
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -114,46 +114,8 @@ class Marionette(MachCommandBase):
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")
return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs)
-
- @SubCommand("marionette", "doc",
- description="Generate Marionette server API documentation in testing/marionette/doc.")
- @CommandArgument("--http",
- help='HTTP service address (e.g. "127.0.0.1:6060" or just ":6060".'
- )
- def marionette_doc(self, http, **kwargs):
- import subprocess
-
- def is_marionette_source_file(filename):
- path = os.path.join(self.srcdir, filename)
- return (os.path.isfile(path)
- and filename.endswith(".js")
- and not filename.startswith("test_"))
-
- srcs = [f for f in os.listdir(
- self.srcdir) if is_marionette_source_file(f)]
-
- proc = subprocess.Popen(
- ["jsdoc", "-c", ".jsdoc.js"] + srcs, cwd=self.srcdir)
- proc.wait()
-
- if http and proc.returncode == 0:
- import SimpleHTTPServer
- import SocketServer
-
- host, port = http.split(":")
- host = host or "127.0.0.1"
- port = int(port)
-
- handler = SimpleHTTPServer.SimpleHTTPRequestHandler
- httpd = SocketServer.TCPServer((host, int(port)), handler)
-
- print("serving at %s:%s" % (host, port))
- os.chdir(os.path.join(self.srcdir, "doc"))
- httpd.serve_forever()
-
- return proc.returncode