Bug 1390595 - Exit with jsdoc return code from "mach marionette doc". r=whimboo
authorAndreas Tolfsen <ato@sny.no>
Tue, 15 Aug 2017 20:00:42 +0100
changeset 375082 153542f0ae5604a4026d85c4fa68c8792783dacf
parent 375081 41d701ddc9587e0baf9171443f874ef85bf59d0e
child 375083 d0fdbb1a1ede0258b5a7e566eccb790a928028c1
push id32347
push userkwierso@gmail.com
push dateWed, 16 Aug 2017 22:30:54 +0000
treeherdermozilla-central@1d38626ba968 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1390595
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1390595 - Exit with jsdoc return code from "mach marionette doc". r=whimboo The "mach marionette doc" command to generate Marionette server API documentation should exit with jsdoc's return code so the caller can determine whether the operation was successful. MozReview-Commit-ID: BXqGQlN5WPN
testing/marionette/mach_commands.py
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -140,22 +140,24 @@ class Marionette(MachCommandBase):
 
         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:
+        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