mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: For test_console_file print out the console file
This should aid debugging of this test flakiness. See: #2799 Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -3213,6 +3213,13 @@ mod tests {
|
||||
let mut f = std::fs::File::open(console_path).unwrap();
|
||||
let mut buf = String::new();
|
||||
f.read_to_string(&mut buf).unwrap();
|
||||
|
||||
if !buf.contains("cloud login:") {
|
||||
eprintln!(
|
||||
"\n\n==== Console file output ====\n\n{}\n\n==== End console file output ====",
|
||||
buf
|
||||
);
|
||||
}
|
||||
assert!(buf.contains("cloud login:"));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user