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

mdbook test #69

Closed
steveklabnik opened this issue Dec 11, 2015 · 4 comments
Closed

mdbook test #69

steveklabnik opened this issue Dec 11, 2015 · 4 comments

Comments

@steveklabnik
Copy link
Member

This would be a subcommand that runs rustdoc --test on each of the source files and reports what happened.

@azerupi
Copy link
Contributor

azerupi commented Dec 11, 2015

That would be a good addition, though I am more inclined to use mdbook test rust or something equivalent, to avoid being constrained if I eventually want to add other tests in the future.

For the implementation, does rustdoc have a Rust API or should I use std::process::Command?

@steveklabnik
Copy link
Member Author

to avoid being constrained if I eventually want to add other tests in the future.

well, I would assume a top-level test would run all tests of all kinds... so that might not be a problem. Depends on what you want to do 😄

For the implementation, does rustdoc have a Rust API or should I use std::process::Command?

It does have a Rust API, but it's hard to use given that it's not on crates.io. I would at least start with Command, given that that's what rustbook does currently.

If we end up being able to put librustdoc up on crates.io in the future, doing it that way might be more robust, but at least you can know that everyone who has Rust installed with have rustdoc, at least.

@azerupi
Copy link
Contributor

azerupi commented Dec 11, 2015

well, I would assume a top-level test would run all tests of all kinds... so that might not be a problem. Depends on what you want to do

You are right ;)

When using Command do you know of a way to check if rustdoc is present on the system before running the command?

@steveklabnik
Copy link
Member Author

You'd use regular shell things, I guess.

Btw I mentioned this to @achrichto this evening and he confirmed Command is the way to go.

On Dec 11, 2015, 18:30 -0500, Mathieu Davidnotifications@github.com, wrote:

well, I would assume a top-level test would run all tests of all kinds... so that might not be a problem. Depends on what you want to do

You are right ;)

When usingCommanddo you know of a way to check ifrustdocis present on the system before running the command?


Reply to this email directly orview it on GitHub(https://github.com/azerupi/mdBook/issues/69#issuecomment-164077293).

steveklabnik referenced this issue in rust-lang/book Dec 14, 2015
For now, we will do this find/xargs stuff, until
https://github.com/azerupi/mdBook/issues/69 happens
This was referenced Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants