mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 21:55:20 +00:00
tests: Split test_simple_launch() into separate tests
This will make it much easier identify which tests are failing. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
ca68b9e7a9
commit
c66be2e974
@ -1754,20 +1754,32 @@ mod parallel {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
fn test_simple_launch() {
|
fn test_bionic_hypervisor_fw() {
|
||||||
let bionic = UbuntuDiskConfig::new(BIONIC_IMAGE_NAME.to_string());
|
test_simple_launch(fw_path(FwType::RustHypervisorFirmware), BIONIC_IMAGE_NAME)
|
||||||
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
|
}
|
||||||
|
|
||||||
vec![Box::new(bionic), Box::new(focal)]
|
#[test]
|
||||||
.drain(..)
|
#[cfg(target_arch = "x86_64")]
|
||||||
.for_each(|disk_config| {
|
fn test_focal_hypervisor_fw() {
|
||||||
vec![
|
test_simple_launch(fw_path(FwType::RustHypervisorFirmware), FOCAL_IMAGE_NAME)
|
||||||
fw_path(FwType::Ovmf),
|
}
|
||||||
fw_path(FwType::RustHypervisorFirmware),
|
|
||||||
]
|
#[test]
|
||||||
.drain(..)
|
#[cfg(target_arch = "x86_64")]
|
||||||
.for_each(|fw_path| {
|
fn test_bionic_ovmf() {
|
||||||
let guest = Guest::new(disk_config.clone());
|
test_simple_launch(fw_path(FwType::Ovmf), BIONIC_IMAGE_NAME)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
fn test_focal_ovmf() {
|
||||||
|
test_simple_launch(fw_path(FwType::Ovmf), FOCAL_IMAGE_NAME)
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
fn test_simple_launch(fw_path: String, disk_path: &str) {
|
||||||
|
let disk_config = Box::new(UbuntuDiskConfig::new(disk_path.to_string()));
|
||||||
|
let guest = Guest::new(disk_config);
|
||||||
|
|
||||||
let mut child = GuestCommand::new(&guest)
|
let mut child = GuestCommand::new(&guest)
|
||||||
.args(&["--cpus", "boot=1"])
|
.args(&["--cpus", "boot=1"])
|
||||||
@ -1794,8 +1806,6 @@ mod parallel {
|
|||||||
let output = child.wait_with_output().unwrap();
|
let output = child.wait_with_output().unwrap();
|
||||||
|
|
||||||
handle_child_output(r, &output);
|
handle_child_output(r, &output);
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user