mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: use basic_regular_guest macro in OVMF test
Refactor test_focal_ovmf to use the basic_regular_guest! macro with the with_kernel() builder instead of manually constructing UbuntuDiskConfig and setting kernel_path. This also removes leftover unused disk_config in test_focal_hypervisor_fw. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
0fc0f2bd0e
commit
6aad6e40c8
@@ -47,7 +47,6 @@ mod common_parallel {
|
|||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
fn test_focal_hypervisor_fw() {
|
fn test_focal_hypervisor_fw() {
|
||||||
let disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
|
||||||
let guest = basic_regular_guest!(FOCAL_IMAGE_NAME)
|
let guest = basic_regular_guest!(FOCAL_IMAGE_NAME)
|
||||||
.with_kernel(fw_path(FwType::RustHypervisorFirmware));
|
.with_kernel(fw_path(FwType::RustHypervisorFirmware));
|
||||||
_test_simple_launch(&guest);
|
_test_simple_launch(&guest);
|
||||||
@@ -56,9 +55,7 @@ mod common_parallel {
|
|||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
fn test_focal_ovmf() {
|
fn test_focal_ovmf() {
|
||||||
let disk_config = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
let guest = basic_regular_guest!(FOCAL_IMAGE_NAME).with_kernel(fw_path(FwType::Ovmf));
|
||||||
let mut guest = Guest::new(Box::new(disk_config));
|
|
||||||
guest.kernel_path = Some(fw_path(FwType::Ovmf));
|
|
||||||
_test_simple_launch(&guest);
|
_test_simple_launch(&guest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user