-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 test --no-run should print paths to stdout #12932
Comments
Sounds like what you are wanting is for Looking over #9957, it seems that our intended way for you to do that is with |
@epage I updated my post as soon as you posted, but yes I'm aware of that solution. When I followed the original issue, they were also aware of this but chose to continue to output the paths. I think this was the right call but it feels like the current solution just added logging instead of addressing the original issue. |
While I understand the convenience of just reading stuff from To me, I would prefer a more formal machine-readable format, like what epage recommended. |
The original issue was targeted at providing the paths for a user which the PR resolved. If we blindly printed paths, that would resolve this for you but would likely be confusing to others without additional context. It would likely need to be opt-in. This is what we have |
@weihanglo I feel that comparison is a bit of a different situation. In that case What I'm suggesting is for the command output to behave more like standard cli tools. For example, @epage Sorry, I wasn't implying that the Issue wasn't resolved, it was more after following the problem my expectations didn't match the solution. The opt-in is reasonable, even if it was just |
That was what I was trying to clarify. We had an existing solution for programmatic usage. The problem that needed solving was for human usage. The solution fits that quite well. The root of this is not with that issue or its solution but that you are questioning the existing programmatic usage.
I mentioned that only in the context that it might not be as reasonable to provide. In maintaining software, we have to balance user requests with the ability to continue to deliver on user requests. The more we add to cargo,
|
@epage Okay sounds reasonable, I'll close the issue then. |
I thought I would mention, since I didn't see anyone reference it, is that the intended method for doing things like qemu for testing is to use a target runner. |
Problem
#10346 allowed printing the executable path from cargo test --no-run. It works however it prints to stderr and doesn't print the paths to stdout.
Proposed Solution
Print just the paths to stdout.
Notes
You would use --no-run for example if you need to execute a cross-arch binary. For example,
qemu-aarch64 <path-to-binary>
.With this change it would be possible to do something like this.
Today the command looks like this,
The text was updated successfully, but these errors were encountered: