diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c7a782..7056cbb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -110,8 +110,8 @@ jobs: rustup override set nightly cargo miri setup - name: Test with Miri Stack Borrows - run: cargo miri test + run: cargo miri test --features global - name: Test with Miri Tree Borrows - run: cargo miri test + run: cargo miri test --features global env: MIRIFLAGS: -Zmiri-tree-borrows diff --git a/tests/global.rs b/tests/global.rs index b5cfacd..7173a50 100644 --- a/tests/global.rs +++ b/tests/global.rs @@ -1,10 +1,10 @@ +#![cfg(feature = "global")] extern crate dlmalloc; use std::collections::HashMap; use std::thread; #[global_allocator] -#[cfg(feature = "global")] static A: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc; #[test] diff --git a/tests/smoke.rs b/tests/smoke.rs index 8bcb5d7..87cd3ab 100644 --- a/tests/smoke.rs +++ b/tests/smoke.rs @@ -24,6 +24,7 @@ fn smoke() { mod fuzz; #[test] +#[cfg(feature = "global")] fn stress() { let mut rng = SmallRng::seed_from_u64(0); let mut buf = vec![0; 4096];