-
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
Print executable name on cargo test --no-run
.
#9959
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Eh2406 (or someone else) soon. Please see the contribution instructions for more information. |
1ae10a6
to
fc44b2d
Compare
Closes rust-lang#9957 Signed-off-by: Vaibhav <vrongmeal@gmail.com>
fc44b2d
to
bef4d79
Compare
@@ -1346,6 +1346,7 @@ fn test_no_run() { | |||
"\ | |||
[COMPILING] foo v0.0.1 ([CWD]) | |||
[FINISHED] test [unoptimized + debuginfo] target(s) in [..] | |||
[EXECUTABLE] [..] (target/debug/deps/foo-[..][EXE]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason to use [..]
here to ignore part of the output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually looked at other tests such as test_run_simple
where the [RUNNING]
part was tested like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, yea I'm not sure why it does that since in that case it is just the word "unittests". I think it would be good to include the actual output here so that it is clearer what is being emitted and checked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have a chance, I would appreciate if you can remove the [..]
here and the other tests just so that the tests are verifying the actual output.
Thanks, looks good. Since this is a somewhat prominent change in cargo's output, I just wanted to double check with the rest of the team: @rfcbot fcp merge Also, just a few minor observations. You don't have to make these changes if you don't want to, since the old output had the same issues, but it might be nice to fix it while we are changing it:
Which of those two executables is for the library and which is for the binary? I might suggest making the first term be a little more descriptive. Maybe something like
I might suggest changing the first term to differentiate depending on if this is |
Team member @ehuss has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I think @ehuss's suggestion for tweaking the output is pretty reasonable, but having this as a feature also seems good to me and doesn't necessarily need to be blocked on output changes. |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
let config = ws.config(); | ||
let cwd = config.cwd(); | ||
for UnitOutput { | ||
unit, | ||
path, | ||
script_meta, | ||
} in compilation.tests.iter() | ||
{ | ||
let (exe_display, cmd) = cmd_builds( | ||
config, | ||
cwd, | ||
unit, | ||
path, | ||
script_meta, | ||
test_args, | ||
&compilation, | ||
)?; | ||
config | ||
.shell() | ||
.concise(|shell| shell.status("Executable", &exe_display))?; | ||
config | ||
.shell() | ||
.verbose(|shell| shell.status("Executable", &cmd))?; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is quite a lot of duplicated code with run_benches
, can this be extracted out to a function to deduplicate it?
@@ -1346,6 +1346,7 @@ fn test_no_run() { | |||
"\ | |||
[COMPILING] foo v0.0.1 ([CWD]) | |||
[FINISHED] test [unoptimized + debuginfo] target(s) in [..] | |||
[EXECUTABLE] [..] (target/debug/deps/foo-[..][EXE]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have a chance, I would appreciate if you can remove the [..]
here and the other tests just so that the tests are verifying the actual output.
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
☔ The latest upstream changes (presumably #10051) made this pull request unmergeable. Please resolve the merge conflicts. |
Ping @vrongmeal Just checking in to see if you are still interested in working on this, or if you had any questions. |
Closes #9957