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 514301 230f156b2393e214874269515b1c0059fe14431b
parent 514300 8b0f8227976b661e217e05f461bd7a86a80f0028
child 514302 4ddef07cfb17ed568a321165746546de93259b64
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [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):