Allow building helper binaries for tests #4356
Labels
A-cargo-targets
Area: selection and definition of targets (lib, bins, examples, tests, benches)
C-enhancement
Category: enhancement
Command-test
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
I've written a few crates that do process manipulation, and when writing tests I find myself needing a helper binary to run and manipulate. Three quick examples are read-process-memory, spawn-ptrace, and spawn-task-port.
I currently just put those helper binaries in
src/bin
so they get built as programs, but they're not intended for end-user consumption and don't need to be built except for test usage. It would be nicer if cargo had a way to build helper binaries for tests, like perhaps.rs
files undertests/bin
could be treated as such? Helper binaries should be considered a dependency of running tests, so they should be rebuilt as necessary before tests are run, but could be built in parallel with the tests themselves.The text was updated successfully, but these errors were encountered: