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

Deduplicate doc tests logic #86254

Closed
GuillaumeGomez opened this issue Jun 12, 2021 · 1 comment · Fixed by #87372
Closed

Deduplicate doc tests logic #86254

GuillaumeGomez opened this issue Jun 12, 2021 · 1 comment · Fixed by #87372
Labels
A-doctests Area: Documentation tests, run by rustdoc C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jun 12, 2021

This comes from a discussion in #86230: for the moment, we call libtest from two places: markdown.rs (which is used when we provide a markdown file as input) and doctest.rs (when a rust file is provided as input, the default).

Both calls can be found when grepping with testing::test_main(.

@GuillaumeGomez GuillaumeGomez added C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc labels Jun 12, 2021
@camelid camelid added the A-doctests Area: Documentation tests, run by rustdoc label Jun 12, 2021
@camelid
Copy link
Member

camelid commented Jun 12, 2021

Probably the deduplicated logic should go in doctest.rs.

@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. and removed T-rustdoc-temp labels Jun 22, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this issue Jul 23, 2021
…, r=jyn514

Move calls to test_main into one function

Fixes rust-lang#86254.

cc `@jyn514`
r? `@camelid`
@bors bors closed this as completed in 7c2436a Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants