mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: Refactor _test_power_button to accept Guest parameter
Remove the acpi bool parameter and internal guest and kernel setup from _test_power_button. The function now accepts a Guest reference and uses default_kernel_cmdline() instead of hardcoded kernel paths. Update test_power_button in common_parallel to create a regular guest via GuestFactory. Update test_power_button_acpi in aarch64_acpi to use with_kernel_path(edk2_path()) for ACPI firmware support. Add with_kernel_path() builder method on Guest in test_infra to allow overriding the kernel path after guest creation. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
19fa512f02
commit
e278e5e931
@@ -1013,6 +1013,11 @@ impl Guest {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_kernel_path(mut self, kernel_path: &str) -> Self {
|
||||
self.kernel_path = Some(kernel_path.to_string());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn default_net_string(&self) -> String {
|
||||
format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.128",
|
||||
|
||||
Reference in New Issue
Block a user