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
1 changed files with 3 additions and 3 deletions
|
|
@ -1190,12 +1190,12 @@ pub struct GuestCommand<'a> {
|
|||
|
||||
impl<'a> GuestCommand<'a> {
|
||||
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 {
|
||||
command: Command::new(clh_command(binary_name)),
|
||||
command: Command::new(binary_path),
|
||||
guest,
|
||||
capture_output: false,
|
||||
print_cmd: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue