arch, vmm: Run KVM specific unit tests with kvm feature guard

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam 2021-01-11 15:19:49 -08:00 committed by Rob Bradford
parent b339aa6b88
commit a194dad98c
2 changed files with 2 additions and 1 deletions

View File

@ -82,6 +82,7 @@ pub fn set_lint(vcpu: &Arc<dyn hypervisor::Vcpu>) -> Result<()> {
}
#[cfg(test)]
#[cfg(feature = "kvm")]
mod tests {
extern crate rand;

View File

@ -2222,7 +2222,7 @@ mod tests {
}
}
#[cfg(target_arch = "x86_64")]
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
#[test]
pub fn test_vm() {
use hypervisor::VmExit;