I have some utility functions in tests/utils/mod.rs
that are used by my integration tests, but I also want to create a testing binary that isn't run as part of cargo test
but can use the functions in tests/utils/mod.rs
. It's a utility that is useful for manual testing, but it only makes sense to run it manually; not using libtest.
The only solution I can think of is to put tests/utils/mod.rs
in its own crate, but I'd really like to avoid that because publishing multi-crate workspaces to crates.io is a real pain. Another option would be to just move tests/utils/mod.rs
to src/test_utils/mod.rs
but that is a bit gross.
Is there a better solution? Maybe something using harness
somehow?