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

libtest: add --list option to list tests and benchmarks #38185

Merged
merged 1 commit into from
Dec 15, 2016

Conversation

jsgf
Copy link
Contributor

@jsgf jsgf commented Dec 5, 2016

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.

@rust-highfive
Copy link
Collaborator

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.

@jsgf jsgf force-pushed the test-list branch 9 times, most recently from 82f961a to c4176cd Compare December 6, 2016 18:24
Ok(false) => std::process::exit(101),
Err(e) => panic!("io error when running tests: {:?}", e),
if opts.list {
match list_tests_console(&opts, tests) {
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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<()>

@sfackler
Copy link
Member

sfackler commented Dec 6, 2016

Seems reasonable to me, though I'll defer to @rust-lang/tools

r? @alexcrichton

@jsgf jsgf force-pushed the test-list branch 2 times, most recently from 5fa648a to c8d8d10 Compare December 6, 2016 21:35
@jsgf
Copy link
Contributor Author

jsgf commented Dec 6, 2016

Use if let instead of single-armed match.

@alexcrichton alexcrichton added the relnotes Marks issues that should be documented in the release notes of the next release. label Dec 9, 2016
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Dec 13, 2016

📌 Commit c8d8d10 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Dec 14, 2016

🔒 Merge conflict

@bors
Copy link
Contributor

bors commented Dec 14, 2016

☔ 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.
@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Dec 14, 2016

📌 Commit 516d105 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Dec 15, 2016

⌛ Testing commit 516d105 with merge 833b03a...

bors added a commit that referenced this pull request Dec 15, 2016
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.
@bors bors merged commit 516d105 into rust-lang:master Dec 15, 2016
@jsgf jsgf deleted the test-list branch December 15, 2016 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants