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

Function clh_command

test_infra/src/lib.rs:2078–2086  ·  view source on GitHub ↗

Returns the absolute path into the workspaces target directory to locate the desired executable. # Arguments - `cmd`: workspace binary, e.g. `ch-remote` or `cloud-hypervisor`

(cmd: &str)

Source from the content-addressed store, hash-verified

2076/// # Arguments
2077/// - `cmd`: workspace binary, e.g. `ch-remote` or `cloud-hypervisor`
2078pub fn clh_command(cmd: &str) -> String {
2079 let workspace_root = workspace_root();
2080 let rustc_target = env::var("BUILD_TARGET").unwrap_or("x86_64-unknown-linux-gnu".to_string());
2081 let target_artifact_dir = format!("target/{rustc_target}/release");
2082 let target_cmd_path = format!("{target_artifact_dir}/{cmd}");
2083
2084 let full_path = workspace_root.join(&target_cmd_path);
2085 String::from(full_path.to_str().unwrap())
2086}
2087
2088pub fn remote_command(api_socket: &str, command: &str, arg: Option<&str>) -> bool {
2089 let mut cmd = Command::new(clh_command("ch-remote"));

Callers 15

_test_live_migrationFunction · 0.85
start_live_migration_tcpFunction · 0.85
_test_live_migration_tcpFunction · 0.85
remote_commandMethod · 0.85
prepare_vubdFunction · 0.85
resize_commandFunction · 0.85

Calls 1

workspace_rootFunction · 0.85

Tested by 15

_test_live_migrationFunction · 0.68
start_live_migration_tcpFunction · 0.68
_test_live_migration_tcpFunction · 0.68
remote_commandMethod · 0.68
prepare_vubdFunction · 0.68
resize_commandFunction · 0.68