mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 11:25:20 +00:00
tests: Report stderr on ch-remote command failure
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
67bfd4e234
commit
30da293d8f
@ -253,8 +253,15 @@ fn remote_command(api_socket: &str, command: &str, arg: Option<&str>) -> bool {
|
|||||||
if let Some(arg) = arg {
|
if let Some(arg) = arg {
|
||||||
cmd.arg(arg);
|
cmd.arg(arg);
|
||||||
}
|
}
|
||||||
|
let output = cmd.output().unwrap();
|
||||||
cmd.status().expect("Failed to launch ch-remote").success()
|
if output.status.success() {
|
||||||
|
true
|
||||||
|
} else {
|
||||||
|
eprintln!("Error running ch-remote command: {:?}", &cmd);
|
||||||
|
let stderr = String::from_utf8_lossy(&output.stderr);
|
||||||
|
eprintln!("stderr: {}", stderr);
|
||||||
|
false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn remote_command_w_output(api_socket: &str, command: &str, arg: Option<&str>) -> (bool, Vec<u8>) {
|
fn remote_command_w_output(api_socket: &str, command: &str, arg: Option<&str>) -> (bool, Vec<u8>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user