Allow creating test binaries with predictable names #12004
Labels
A-cargo-targets
Area: selection and definition of targets (lib, bins, examples, tests, benches)
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-needs-design
Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Problem
I have a fleet of machines that build code, on these I want to run
cargo build --tests
to build a test binary, and hand that over to the machines that actually run the tests.At the moment, because the generated binary has a non-predictable name (it contains a hash), we'd have to resort to the annoying trick of using
--mesage-format=json
and parse the output json to find the binary. See example.Proposed Solution
It'd be nice to have a flag to name the test executable:
cargo build --tests --out-name="my-tests-binary"
, or a way to remove the hash from the name.Notes
No response
The text was updated successfully, but these errors were encountered: