Bug 823787 - Make profilerserver.py use a non-zero exit code on failure. r=ted.
☠☠ backed out by 8b5875dc7e31 ☠ ☠
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 12 Dec 2013 14:08:40 -0800
changeset 176138 f1abdc201968ca8ff8c871674e9314a2466b8404
parent 176137 07e7a99841a64c59faf7ba1bd007e791c0c07b83
child 176173 f72cf27f3a2ac5b0ba2c0bc781eb5a81a0a398f6
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs823787
milestone29.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 823787 - Make profilerserver.py use a non-zero exit code on failure. r=ted.
build/pgo/profileserver.py
--- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py
@@ -60,12 +60,20 @@ if __name__ == '__main__':
       print "jarlog: %s" % env["MOZ_JAR_LOG_FILE"]
 
     cmdargs = ["http://localhost:%d/index.html" % PORT]
     runner = FirefoxRunner(profile=profile,
                            binary=build.get_binary_path(where="staged-package"),
                            cmdargs=cmdargs,
                            env=env)
     runner.start(debug_args=debug_args, interactive=interactive)
-    runner.wait()
+    status = runner.wait()
     httpd.stop()
+    if status != 0:
+        status = 1      # normalize status, in case it's larger than 127
+
+    # Note:  the |finally| block below will always run.
+    # http://docs.python.org/2/library/sys.html#sys.exit says that sys.exit "is
+    # implemented by raising the SystemExit exception, so cleanup actions
+    # specified by finally clauses of try statements are honored".
+    sys.exit(status)
   finally:
     shutil.rmtree(profilePath)