Skip to content

Run documentation examples with cargo test #610

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

Closed
andreeaflorescu opened this issue Nov 19, 2018 · 1 comment
Closed

Run documentation examples with cargo test #610

andreeaflorescu opened this issue Nov 19, 2018 · 1 comment
Labels
Good first issue Indicates a good issue for first-time contributors Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled

Comments

@andreeaflorescu
Copy link
Member

The documentation examples should be run along with the unit tests. Currently, cargo test does not run the examples because cargo does not have support for running doc tests when cross-compiling.
Cargo test issue: rust-lang/cargo#2684

A possible workaround would be to skip the crates that cannot be built with gnu (one of them is x86 as far as I remember because some ioctl have different parameters).
Another workaround is making firecracker buildable with both gnu and musl and run the unit tests with both.

There might be other solutions out there.

@andreeaflorescu andreeaflorescu added the Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled label Nov 22, 2018
@alxiord alxiord added the Good first issue Indicates a good issue for first-time contributors label Nov 26, 2018
@dianpopa
Copy link
Contributor

Fixed by #639 which also added an integration tests for making sure documentation examples are successfully built and exercised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Indicates a good issue for first-time contributors Priority: Medium Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled
Projects
None yet
Development

No branches or pull requests

3 participants