Sum log files in case of test failure

This commit is contained in:
Konstantin Knizhnik
2021-04-22 22:27:12 +03:00
parent ee87e6aad3
commit 5f277755b1

View File

@@ -404,10 +404,13 @@ impl PostgresNode {
for entry in fs::read_dir(dir).unwrap() {
let entry = entry.unwrap();
let path = entry.path();
let mut file = File::open(&path).unwrap();
let mut buffer = String::new();
file.read_to_string(&mut buffer).unwrap();
println!("File {:?}:\n{}", &path, buffer);
if path.is_dir() {
if let Ok(mut file) = File::open(path.join("pageserver.log")) {
let mut buffer = String::new();
file.read_to_string(&mut buffer).unwrap();
println!("File {:?}:\n{}", &path, buffer);
}
}
}
}