Skip to content

Coverage with doctests #1080

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
tgross35 opened this issue Oct 30, 2023 · 7 comments
Closed

Coverage with doctests #1080

tgross35 opened this issue Oct 30, 2023 · 7 comments

Comments

@tgross35
Copy link

Nextest unfortunately can't support doctests yet (#16), but is there a way to have test coverage report include doctests?

Maybe cargo-llvm-cov can somehow combine the reports of cargo llvm-cov nextest --lcov --output-path lcov.info with the result of llvm-cov running doctests on its own.

@taiki-e
Copy link
Contributor

taiki-e commented Oct 30, 2023

Maybe cargo-llvm-cov can somehow combine the reports of cargo llvm-cov nextest --lcov --output-path lcov.info with the result of llvm-cov running doctests on its own.

Yes. See https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#merge-coverages-generated-under-different-test-conditions (or https://github.com/taiki-e/cargo-llvm-cov?tab=readme-ov-file#get-coverage-of-external-tests) for details.

@sunshowers
Copy link
Member

Worth documenting this at https://nexte.st/book/test-coverage.html.

@tgross35
Copy link
Author

@tgross35
Copy link
Author

taiki-e added a commit to taiki-e/cargo-llvm-cov that referenced this issue Oct 30, 2023
taiki-e added a commit to taiki-e/cargo-llvm-cov that referenced this issue Oct 30, 2023
@taiki-e
Copy link
Contributor

taiki-e commented Oct 30, 2023

Oh, that's a cargo-llvm-cov bug. It should be fixed by passing --doctests to cargo llvm-cov report with just released cargo-llvm-cov 0.5.36 (taiki-e/cargo-llvm-cov@5289e9e).

@tgross35
Copy link
Author

sunshowers added a commit to sunshowers/nextest that referenced this issue Oct 30, 2023
sunshowers added a commit to sunshowers/nextest that referenced this issue Oct 30, 2023
sunshowers added a commit to sunshowers/nextest that referenced this issue Oct 30, 2023
@sunshowers
Copy link
Member

Added documentation.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants