mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +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:
parent
d494d6b837
commit
f40e8ce6b7
@ -3213,6 +3213,13 @@ mod tests {
|
|||||||
let mut f = std::fs::File::open(console_path).unwrap();
|
let mut f = std::fs::File::open(console_path).unwrap();
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
f.read_to_string(&mut buf).unwrap();
|
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:"));
|
assert!(buf.contains("cloud login:"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user