From 2c3e401b0b7f156142e0114dba28c7c756d8fc30 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 28 Aug 2021 15:06:44 +0200 Subject: [PATCH] Remove some warnings on freebsd --- tests/by-util/test_install.rs | 4 +++- tests/by-util/test_touch.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/by-util/test_install.rs b/tests/by-util/test_install.rs index 846dc5836..339a40454 100644 --- a/tests/by-util/test_install.rs +++ b/tests/by-util/test_install.rs @@ -4,7 +4,7 @@ use crate::common::util::*; use filetime::FileTime; use rust_users::*; use std::os::unix::fs::PermissionsExt; -#[cfg(not(windows))] +#[cfg(not(any(windows, target_os = "freebsd")))] use std::process::Command; #[cfg(target_os = "linux")] use std::thread::sleep; @@ -551,7 +551,9 @@ fn test_install_copy_then_compare_file_with_extra_mode() { } const STRIP_TARGET_FILE: &str = "helloworld_installed"; +#[cfg(not(any(windows, target_os = "freebsd")))] const SYMBOL_DUMP_PROGRAM: &str = "objdump"; +#[cfg(not(any(windows, target_os = "freebsd")))] const STRIP_SOURCE_FILE_SYMBOL: &str = "main"; fn strip_source_file() -> &'static str { diff --git a/tests/by-util/test_touch.rs b/tests/by-util/test_touch.rs index c7261fad3..e8a17bbca 100644 --- a/tests/by-util/test_touch.rs +++ b/tests/by-util/test_touch.rs @@ -16,6 +16,7 @@ fn get_file_times(at: &AtPath, path: &str) -> (FileTime, FileTime) { ) } +#[cfg(not(target_os = "freebsd"))] fn get_symlink_times(at: &AtPath, path: &str) -> (FileTime, FileTime) { let m = at.symlink_metadata(path); (