mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-03 11:25:20 +00:00
test_infra: Allow to create a GuestCommand with input binary path
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
parent
4ca066f077
commit
f81220ae2d
@ -1190,12 +1190,12 @@ pub struct GuestCommand<'a> {
|
|||||||
|
|
||||||
impl<'a> GuestCommand<'a> {
|
impl<'a> GuestCommand<'a> {
|
||||||
pub fn new(guest: &'a Guest) -> Self {
|
pub fn new(guest: &'a Guest) -> Self {
|
||||||
Self::new_with_binary_name(guest, "cloud-hypervisor")
|
Self::new_with_binary_path(guest, &clh_command("cloud-hypervisor"))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_with_binary_name(guest: &'a Guest, binary_name: &str) -> Self {
|
pub fn new_with_binary_path(guest: &'a Guest, binary_path: &str) -> Self {
|
||||||
Self {
|
Self {
|
||||||
command: Command::new(clh_command(binary_name)),
|
command: Command::new(binary_path),
|
||||||
guest,
|
guest,
|
||||||
capture_output: false,
|
capture_output: false,
|
||||||
print_cmd: true,
|
print_cmd: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user