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
Cargo provides a temp directory for integration tests via CARGO_TARGET_TMPDIR. It's unfortunately not currently set for unit tests but it might still be nice to use it when it's available (I am only using testdir with integration tests, and I imagine that's somewhat typical). rust-lang/cargo#9375 has some context behind the motivation for this variable and why it's only set for integration tests.
FWIW I went looking for this setting because I was a little surprised testdir creates all its directories right in the target/ root; it ends up creating nine entries that seem like they could be nested under a common parent directory to keep the root dir cleaner. So in addition to / instead of using CARGO_TARGET_TMPDIR it might be nice to put all these paths under a single common directory such as target/testdir/dir-*.
The text was updated successfully, but these errors were encountered:
So in addition to / instead of using CARGO_TARGET_TMPDIR it might be nice to put all these paths under a single common directory such as target/testdir/dir-*.
Thanks for the reference. Doing this I guess means that testdir would behave differently when running integration tests as when running unittests because cargo will always set this directory for integration tests? So now you'd have two paths where you have to go look depending on which tests you happened to run. I'm not entirely sure how much I like this.
Yeah I agree it's too bad the var isn't consistently set (it sounds like others would like it too), but it might still make sense to respect it if/when it is set, even if that's not always the case.
Cargo provides a temp directory for integration tests via
CARGO_TARGET_TMPDIR
. It's unfortunately not currently set for unit tests but it might still be nice to use it when it's available (I am only using testdir with integration tests, and I imagine that's somewhat typical). rust-lang/cargo#9375 has some context behind the motivation for this variable and why it's only set for integration tests.FWIW I went looking for this setting because I was a little surprised testdir creates all its directories right in the
target/
root; it ends up creating nine entries that seem like they could be nested under a common parent directory to keep the root dir cleaner. So in addition to / instead of usingCARGO_TARGET_TMPDIR
it might be nice to put all these paths under a single common directory such astarget/testdir/dir-*
.The text was updated successfully, but these errors were encountered: