-
Notifications
You must be signed in to change notification settings - Fork 13k
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
libtest: add --list option to list tests and benchmarks #38185
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @sfackler (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
82f961a
to
c4176cd
Compare
Ok(false) => std::process::exit(101), | ||
Err(e) => panic!("io error when running tests: {:?}", e), | ||
if opts.list { | ||
match list_tests_console(&opts, tests) { |
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.
This can't actually return Ok(false), right?
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.
No, I was just following the return for the other function - but I'm fine with it being an io::Result<()>
as well - or hoisting the two matches into one.
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.
Yeah, I'd probably have it return io::Result<()>
then.
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.
Updated to return io::Result<()>
Seems reasonable to me, though I'll defer to @rust-lang/tools |
5fa648a
to
c8d8d10
Compare
Use |
@bors: r+ |
📌 Commit c8d8d10 has been approved by |
🔒 Merge conflict |
☔ The latest upstream changes (presumably #38181) made this pull request unmergeable. Please resolve the merge conflicts. |
This option lists all the tests and benchmarks a binary provides. By default the listing is sent to stdout, but if --logfile is also specified, it is written there. If filters are specified, they're applied before the output is emitted.
@bors: r+ |
📌 Commit 516d105 has been approved by |
libtest: add --list option to list tests and benchmarks This option lists all the tests and benchmarks a binary provides without running any of them. By default the listing is sent to stdout (intended for human consumption), but if `--logfile` is also specified, it is also written there in an easily parsable form. If filters are specified, they're applied before the output is emitted. The human output will also include a summary unless `-q` is specified.
This option lists all the tests and benchmarks a binary provides without running any of them.
By default the listing is sent to stdout (intended for human consumption), but if
--logfile
is also specified, it is also written there in an easily parsable form.If filters are specified, they're applied before the output is emitted. The human output will also include a summary unless
-q
is specified.