slighly more information when reporting valgrind problem

This commit is contained in:
Folkert 2022-04-08 10:49:06 +02:00
parent e141894fa1
commit c6ce18d56c
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -111,7 +111,7 @@ mod cli_run {
build_example(file, &all_flags[..]); build_example(file, &all_flags[..]);
let out = if use_valgrind && ALLOW_VALGRIND { let out = if use_valgrind && ALLOW_VALGRIND {
let (valgrind_out, raw_xml) = if let Some(input_file) = input_file { let (valgrind_out, raw_xml) = if let Some(ref input_file) = input_file {
run_with_valgrind( run_with_valgrind(
stdin, stdin,
&[ &[
@ -149,7 +149,10 @@ mod cli_run {
println!(" {}", text); println!(" {}", text);
} }
} }
panic!("Valgrind reported memory errors"); panic!(
"Valgrind reported memory errors in {:?} with flags {:?}",
file, flags
);
} }
} else { } else {
let exit_code = match valgrind_out.status.code() { let exit_code = match valgrind_out.status.code() {