diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 74d86d2b521dc..da88f908f6486 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -733,7 +733,9 @@ impl<'test> TestCx<'test> { unexpected.len(), not_found.len() )); - println!("status: {}\ncommand: {}\n", proc_res.status, proc_res.cmdline); + if env::var("COMPILETEST_DEBUG_INFO").is_ok() { + println!("status: {}\ncommand: {}\n", proc_res.status, proc_res.cmdline); + } if !unexpected.is_empty() { println!("{}", "--- unexpected errors (from JSON output) ---".green()); for error in &unexpected { @@ -2731,6 +2733,9 @@ impl ProcRes { ) } } + if env::var("COMPILETEST_DEBUG_INFO").is_err() { + return; + } println!( "status: {}\ncommand: {}\n{}\n{}\n",