Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo build --out-dir does not place tests in out dir #12140

Closed
stepancheg opened this issue May 15, 2023 · 2 comments
Closed

cargo build --out-dir does not place tests in out dir #12140

stepancheg opened this issue May 15, 2023 · 2 comments
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@stepancheg
Copy link
Contributor

Problem

Test binaries are not copied to out dir.

Repro:

  • clone any repo with tests for example https://github.com/servo/rust-fnv
  • cargo build -Zunstable-options --out-dir 11 copies rlib to directory 11
  • cargo build -Zunstable-options --tests --out-dir 11 does not place test binary in 11 directory

cargo build --help says:

--out-dir <PATH>          Copy final artifacts to this directory (unstable)

Not clear what is "final artifact", but if a user requested to build a test, then the test binary must be the artifact?

Proposed Solution

Unknown. I built a test, and now I need to debug it. How do I find the test binary path?

Notes

No response

@stepancheg stepancheg added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage. labels May 15, 2023
@weihanglo
Copy link
Member

Thanks for the report and please see #11110.

#3670 may also have a possible route to the solution. I am not really sure though.

@weihanglo
Copy link
Member

I am going to close this. We will track it in #3670. I think this is kinda a XY problem. We wanted to get the test binary. Tried out --out-dir but it turns out not working. There are also some alternatives in #11110. If this is wrong and the issue should remain open, please let us know. Thank you.

@weihanglo weihanglo closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

2 participants