aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-06-21 16:40:18 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2019-06-22 00:56:29 +0300
commitd1dd6df37b3061d3595a25a2c12f04de235449a8 (patch)
treebcc1dc1db723097101a1f3e643443a64f3aa3474
parent2cabda8d68c18f0a986dcea11ee2db577792e42a (diff)
downloadmeson-d1dd6df37b3061d3595a25a2c12f04de235449a8.zip
meson-d1dd6df37b3061d3595a25a2c12f04de235449a8.tar.gz
meson-d1dd6df37b3061d3595a25a2c12f04de235449a8.tar.bz2
Increase logging for Rust CI failures.
-rw-r--r--mesonbuild/compilers/rust.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py
index 17b7e3b..332cee6 100644
--- a/mesonbuild/compilers/rust.py
+++ b/mesonbuild/compilers/rust.py
@@ -47,10 +47,18 @@ class RustCompiler(Compiler):
ofile.write('''fn main() {
}
''')
- pc = subprocess.Popen(self.exelist + ['-o', output_name, source_name], cwd=work_dir)
- pc.wait()
+ pc = subprocess.Popen(self.exelist + ['-o', output_name, source_name],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ cwd=work_dir)
+ stdo, stde = pc.communicate()
+ stdo = stdo.decode('utf-8', errors='replace')
+ stde = stde.decode('utf-8', errors='replace')
if pc.returncode != 0:
- raise EnvironmentException('Rust compiler %s can not compile programs.' % self.name_string())
+ raise EnvironmentException('Rust compiler %s can not compile programs.\n%s\n%s' % (
+ self.name_string(),
+ stdo,
+ stde))
if self.is_cross:
if self.exe_wrapper is None:
# Can't check if the binaries run so we have to assume they do