From 0f5e5d9e6df9cb624955c2a76e799badd8607a1c Mon Sep 17 00:00:00 2001 From: Michael Zhao Date: Fri, 30 Oct 2020 09:05:13 +0800 Subject: [PATCH] tests: Fix some build warnings in integration test on AArch64 Signed-off-by: Michael Zhao --- tests/integration.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/integration.rs b/tests/integration.rs index 428ef4a08..ae360ede9 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -31,6 +31,7 @@ mod tests { use std::thread; use tempdir::TempDir; use tempfile::NamedTempFile; + #[cfg_attr(target_arch = "aarch64", allow(unused_imports))] use wait_timeout::ChildExt; lazy_static! { @@ -5579,10 +5580,10 @@ mod tests { } } + #[cfg(target_arch = "x86_64")] mod windows { use crate::tests::*; - #[cfg(target_arch = "x86_64")] fn windows_auth() -> PasswordAuth { PasswordAuth { username: String::from("administrator"), @@ -5591,7 +5592,6 @@ mod tests { } #[test] - #[cfg(target_arch = "x86_64")] fn test_windows_guest() { let mut workload_path = dirs::home_dir().unwrap(); workload_path.push("workloads"); @@ -5643,7 +5643,6 @@ mod tests { } #[test] - #[cfg(target_arch = "x86_64")] fn test_windows_guest_snapshot_restore() { let tmp_dir = TempDir::new("ch").unwrap(); let mut workload_path = dirs::home_dir().unwrap(); @@ -5738,11 +5737,11 @@ mod tests { } } + #[cfg(target_arch = "x86_64")] mod sgx { use crate::tests::*; #[test] - #[cfg(target_arch = "x86_64")] fn test_sgx() { let mut focal = UbuntuDiskConfig::new(FOCAL_SGX_IMAGE_NAME.to_string()); let guest = Guest::new(&mut focal);