mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
tests: add basic_regular_guest macro and with_kernel
Introduce a basic_regular_guest! macro in integration.rs to reduce boilerplate when creating regular (non-CVM) guest instances. Also add a with_kernel() builder method to Guest in test_infra, allowing fluent configuration of the kernel path. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
7802470906
commit
0fc0f2bd0e
@@ -1018,6 +1018,11 @@ impl Guest {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_kernel(mut self, kernel: String) -> Self {
|
||||
self.kernel_path = Some(kernel);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn default_net_string(&self) -> String {
|
||||
format!(
|
||||
"tap=,mac={},ip={},mask=255.255.255.128",
|
||||
|
||||
Reference in New Issue
Block a user