You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run some of my crate's executables in a test. Currently I have to
Figure out the relative path to target (that path changes depending on whether this is a single crate project (./target) or if the crate is being built as part of a workspace (../target)).
Figure out whether this is a release or debug build by comparing the modification times of the executable.
Describe the solution you'd like
I would like environment variables that tell me
The full path to where the executables are located.
(optionally) Whether this is a debug or release build.
Notes
cargo makes sure that the executables are built before the tests are run, so I believe this doesn't go against cargo best-practices to use freshly-built executables in test, but I'm happy to reconsider.
The text was updated successfully, but these errors were encountered:
nmattia
added
the
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
label
Jul 8, 2019
Thanks for the report! Issue #5758 is already tracking this, so I'm going to close in favor of that. I'm working on a solution, so hopefully will have something soonish.
Describe the problem you are trying to solve
I'm trying to run some of my crate's executables in a test. Currently I have to
target
(that path changes depending on whether this is a single crate project (./target
) or if the crate is being built as part of a workspace (../target
)).release
ordebug
build by comparing the modification times of the executable.Describe the solution you'd like
I would like environment variables that tell me
Notes
cargo
makes sure that the executables are built before the tests are run, so I believe this doesn't go against cargo best-practices to use freshly-built executables in test, but I'm happy to reconsider.The text was updated successfully, but these errors were encountered: