From 8909a09d2a8713c4fc0c31c2df6c9b022b840213 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 17 Mar 2025 15:21:49 +0100 Subject: compilers: clike: log output of sanity check Particularly if using an exe_wrapper, it can be useful to have output logged for debugging. Signed-off-by: Paolo Bonzini --- mesonbuild/compilers/mixins/clike.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index b163407f7..a42ee9633 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -317,8 +317,7 @@ class CLikeCompiler(Compiler): cmdlist = [binary_name] mlog.debug('Running test binary command: ', mesonlib.join_args(cmdlist)) try: - # fortran code writes to stdout - pe = subprocess.run(cmdlist, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + pe, _, _ = Popen_safe_logged(cmdlist, 'Sanity check', cwd=work_dir) except Exception as e: raise mesonlib.EnvironmentException(f'Could not invoke sanity test executable: {e!s}.') if pe.returncode != 0: -- cgit v1.2.3