Bug 1520815 - Make RunCbindgen.py generate less noise on failure. r=boris
authorEmilio Cobos Álvarez <emilio@crisal.io>
Thu, 17 Jan 2019 18:44:29 +0000
changeset 511419 230f156b2393e214874269515b1c0059fe14431b
parent 511418 8b0f8227976b661e217e05f461bd7a86a80f0028
child 511420 4ddef07cfb17ed568a321165746546de93259b64
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersboris
bugs1520815
milestone66.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 1520815 - Make RunCbindgen.py generate less noise on failure. r=boris file_generate understands non-zero return codes, and makes the output less noisy. Differential Revision: https://phabricator.services.mozilla.com/D16859
layout/style/RunCbindgen.py
--- a/layout/style/RunCbindgen.py
+++ b/layout/style/RunCbindgen.py
@@ -20,17 +20,19 @@ def generate(output, cbindgen_crate_path
         "--lockfile",
         CARGO_LOCK,
         "--crate",
         mozpath.basename(cbindgen_crate_path),
     ], env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
     stdout, stderr = p.communicate()
     if p.returncode != 0:
-        raise TypeError("cbindgen failed: %s" % stderr)
+        print(stdout)
+        print(stderr)
+        return p.returncode
 
     output.write(stdout)
 
     deps = set()
     deps.add(CARGO_LOCK)
     deps.add(mozpath.join(cbindgen_crate_path, "cbindgen.toml"))
     for directory in in_tree_dependencies + (cbindgen_crate_path,):
         for path, dirs, files in os.walk(directory):