From 03821e9fafff27696fddb16bd18c52fcaa32da2d Mon Sep 17 00:00:00 2001 From: xieyuschen Date: Wed, 16 Oct 2024 17:12:19 +0800 Subject: [PATCH] [#213] Introduce test feature in iceoryx-bb for bump_allocator --- iceoryx2-bb/container/Cargo.toml | 2 +- iceoryx2-bb/elementary/Cargo.toml | 2 ++ iceoryx2-bb/elementary/src/lib.rs | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/iceoryx2-bb/container/Cargo.toml b/iceoryx2-bb/container/Cargo.toml index 03a915943..001a7d42d 100644 --- a/iceoryx2-bb/container/Cargo.toml +++ b/iceoryx2-bb/container/Cargo.toml @@ -14,7 +14,7 @@ version = { workspace = true } [dependencies] iceoryx2-bb-derive-macros = { workspace = true } -iceoryx2-bb-elementary = { workspace = true } +iceoryx2-bb-elementary = { workspace = true , features = ["iox2-test"]} iceoryx2-bb-log = { workspace = true } iceoryx2-pal-concurrency-sync = { workspace = true } serde = { workspace = true } diff --git a/iceoryx2-bb/elementary/Cargo.toml b/iceoryx2-bb/elementary/Cargo.toml index 2ebb07476..35e82abdd 100644 --- a/iceoryx2-bb/elementary/Cargo.toml +++ b/iceoryx2-bb/elementary/Cargo.toml @@ -18,3 +18,5 @@ iceoryx2-bb-testing = { workspace = true } generic-tests = { workspace = true } +[features] +iox2-test = [] \ No newline at end of file diff --git a/iceoryx2-bb/elementary/src/lib.rs b/iceoryx2-bb/elementary/src/lib.rs index 3b1bfb0df..e49f14828 100644 --- a/iceoryx2-bb/elementary/src/lib.rs +++ b/iceoryx2-bb/elementary/src/lib.rs @@ -18,6 +18,8 @@ pub mod enum_gen; /// A strong type that represents the alignment part of [`std::alloc::Layout`] pub mod alignment; pub mod allocator; + +#[cfg(any(test, feature = "iox2-test"))] pub mod bump_allocator; pub mod lazy_singleton; pub mod math;