tests: Fix some build warnings in integration test on AArch64

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao 2020-10-30 09:05:13 +08:00 committed by Rob Bradford
parent 4606f0f28a
commit 0f5e5d9e6d

View File

@ -31,6 +31,7 @@ mod tests {
use std::thread; use std::thread;
use tempdir::TempDir; use tempdir::TempDir;
use tempfile::NamedTempFile; use tempfile::NamedTempFile;
#[cfg_attr(target_arch = "aarch64", allow(unused_imports))]
use wait_timeout::ChildExt; use wait_timeout::ChildExt;
lazy_static! { lazy_static! {
@ -5579,10 +5580,10 @@ mod tests {
} }
} }
#[cfg(target_arch = "x86_64")]
mod windows { mod windows {
use crate::tests::*; use crate::tests::*;
#[cfg(target_arch = "x86_64")]
fn windows_auth() -> PasswordAuth { fn windows_auth() -> PasswordAuth {
PasswordAuth { PasswordAuth {
username: String::from("administrator"), username: String::from("administrator"),
@ -5591,7 +5592,6 @@ mod tests {
} }
#[test] #[test]
#[cfg(target_arch = "x86_64")]
fn test_windows_guest() { fn test_windows_guest() {
let mut workload_path = dirs::home_dir().unwrap(); let mut workload_path = dirs::home_dir().unwrap();
workload_path.push("workloads"); workload_path.push("workloads");
@ -5643,7 +5643,6 @@ mod tests {
} }
#[test] #[test]
#[cfg(target_arch = "x86_64")]
fn test_windows_guest_snapshot_restore() { fn test_windows_guest_snapshot_restore() {
let tmp_dir = TempDir::new("ch").unwrap(); let tmp_dir = TempDir::new("ch").unwrap();
let mut workload_path = dirs::home_dir().unwrap(); let mut workload_path = dirs::home_dir().unwrap();
@ -5738,11 +5737,11 @@ mod tests {
} }
} }
#[cfg(target_arch = "x86_64")]
mod sgx { mod sgx {
use crate::tests::*; use crate::tests::*;
#[test] #[test]
#[cfg(target_arch = "x86_64")]
fn test_sgx() { fn test_sgx() {
let mut focal = UbuntuDiskConfig::new(FOCAL_SGX_IMAGE_NAME.to_string()); let mut focal = UbuntuDiskConfig::new(FOCAL_SGX_IMAGE_NAME.to_string());
let guest = Guest::new(&mut focal); let guest = Guest::new(&mut focal);