diff options
author | Florian Klink <flokli@flokli.de> | 2024-05-26T14·21+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-05-26T19·46+0000 |
commit | 9586e5c30da23dd25d404d075a64161689f8cc02 (patch) | |
tree | 97410fd75187730bb9eecafbbbb2b5b29732afaa /tvix/castore/src/fs/mod.rs | |
parent | 61cf4905fe4ad01b87c0251d7a90426b7b0ea3bc (diff) |
refactor(tvix/castore): move src/fs/test into fuse mod r/8172
These tests only interact with the FUSE layer, and import super::fuse to do its work. However, this only works if the `fuse` feature is enabled, which we don't do if we enable the `virtiofs` feature only, causing the tests to fail: ``` ❯ cargo test --no-default-features --features virtiofs Compiling tvix-castore v0.1.0 (/home/flokli/dev/nixos/code.tvl.fyi-submit2/tvix/castore) error[E0432]: unresolved import `super::fuse` --> castore/src/fs/tests.rs:14:13 | 14 | use super::{fuse::FuseDaemon, TvixStoreFs}; | ^^^^ could not find `fuse` in `super` ``` We move src/fs/tests.rs to src/fs/fuse/tests.rs (and src/fs/fuse.rs to src/fs/fuse/mod.rs) to better structure this, which will automatically cause both tests and code to only be built if we have the `fuse` feature enabled. Change-Id: I8fbbad3e4457e326bdfd171aa5c43d25d3187b5b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11715 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/castore/src/fs/mod.rs')
-rw-r--r-- | tvix/castore/src/fs/mod.rs | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tvix/castore/src/fs/mod.rs b/tvix/castore/src/fs/mod.rs index 826523131fbd..176199f64aaf 100644 --- a/tvix/castore/src/fs/mod.rs +++ b/tvix/castore/src/fs/mod.rs @@ -9,9 +9,6 @@ pub mod fuse; #[cfg(feature = "virtiofs")] pub mod virtiofs; -#[cfg(test)] -mod tests; - pub use self::root_nodes::RootNodes; use self::{ file_attr::ROOT_FILE_ATTR, |