From 459764e7f12832ae3fffec80c8b58e91b4fa3d79 Mon Sep 17 00:00:00 2001 From: owl Date: Mon, 7 Oct 2024 22:30:01 +0800 Subject: [PATCH] test: let ofs behavior test running on the macos --- bin/ofs/tests/common/mod.rs | 4 ++-- bin/ofs/tests/file.rs | 2 +- bin/ofs/tests/path.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/ofs/tests/common/mod.rs b/bin/ofs/tests/common/mod.rs index 2fbfcc10fd10..014521013165 100644 --- a/bin/ofs/tests/common/mod.rs +++ b/bin/ofs/tests/common/mod.rs @@ -27,7 +27,7 @@ use tokio::runtime::{self}; static INIT_LOGGER: OnceLock<()> = OnceLock::new(); static RUNTIME: OnceLock = OnceLock::new(); -#[cfg(any(target_os = "linux", target_os = "freebsd"))] +#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))] pub struct OfsTestContext { pub mount_point: TempDir, // This is a false positive, the field is used in the test. @@ -36,7 +36,7 @@ pub struct OfsTestContext { mount_handle: fuse3::raw::MountHandle, } -#[cfg(any(target_os = "linux", target_os = "freebsd"))] +#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))] impl TestContext for OfsTestContext { fn setup() -> Self { let backend = tests::init_test_service() diff --git a/bin/ofs/tests/file.rs b/bin/ofs/tests/file.rs index c92f0222786e..6318c0d47b98 100644 --- a/bin/ofs/tests/file.rs +++ b/bin/ofs/tests/file.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#![cfg(any(target_os = "linux", target_os = "freebsd"))] +#![cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))] mod common; diff --git a/bin/ofs/tests/path.rs b/bin/ofs/tests/path.rs index 1357f792710e..c1a6b46c8881 100644 --- a/bin/ofs/tests/path.rs +++ b/bin/ofs/tests/path.rs @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -#![cfg(any(target_os = "linux", target_os = "freebsd"))] +#![cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))] mod common;