pub struct Target {
pub name: String,
pub image: Option<PathBuf>,
pub uefi: bool,
pub kernel: Option<PathBuf>,
pub kernel_args: Option<String>,
pub rootfs: PathBuf,
pub arch: String,
pub qemu_command: Option<String>,
pub command: String,
pub vm: VMConfig,
}Expand description
Config for a single target
Fields§
§name: StringName of the testing target.
image: Option<PathBuf>Path to image to test against.
- The path is relative to
vmtest.toml. - The image must be bootable.
uefi: boolWhether or not image should be booted using UEFI
Default: false
kernel: Option<PathBuf>Path to kernel image to test against.
- The path is relative to
vmtest.toml. vmlinux,vmlinuz, andbzImageformats are accepted.
kernel_args: Option<String>Additional kernel command line parameters.
Arguments are only valid for kernel targets.
rootfs: PathBufPath to rootfs to test against.
- The path is relative to
vmtest.toml. - If not specified, the host’s rootfs will be used.
Default: /
arch: StringArch to run
qemu_command: Option<String>Command used to launch QEMU
command: StringCommand to run inside virtual machine.
vm: VMConfigVM Configuration.
Implementations§
Source§impl Target
impl Target
Sourcepub fn default_rootfs() -> PathBuf
pub fn default_rootfs() -> PathBuf
Default rootfs path to use if none are specified.
Sourcepub fn default_arch() -> String
pub fn default_arch() -> String
Default architecure to use if none are specified.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Target
impl<'de> Deserialize<'de> for Target
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more