MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / remote_command

Method remote_command

cloud-hypervisor/tests/common/utils.rs:70–88  ·  view source on GitHub ↗
(&self, command: &str, arg: Option<&str>)

Source from the content-addressed store, hash-verified

68 }
69
70 pub(crate) fn remote_command(&self, command: &str, arg: Option<&str>) -> bool {
71 let mut cmd = Command::new(clh_command("ch-remote"));
72 cmd.args(self.remote_args());
73 cmd.arg(command);
74
75 if let Some(arg) = arg {
76 cmd.arg(arg);
77 }
78
79 let output = cmd.output().unwrap();
80 if output.status.success() {
81 true
82 } else {
83 eprintln!("Error running ch-remote command: {:?}", &cmd);
84 let stderr = String::from_utf8_lossy(&output.stderr);
85 eprintln!("stderr: {stderr}");
86 false
87 }
88 }
89}
90
91pub(crate) fn temp_api_path(tmp_dir: &TempDir) -> String {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
clh_commandFunction · 0.85
argsMethod · 0.80
remote_argsMethod · 0.80

Tested by

no test coverage detected