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

Fix include-test config to include non-std test #1503

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

tyrone-wu
Copy link
Contributor

@tyrone-wu tyrone-wu commented Apr 4, 2024

Motivation:
The original issue is sorta described here: #351 (comment).
But tl;dr version is when include-tests is set, #[tokio::test] is not covered in the coverage report.

Changes in this PR:
Added an additional condition to visit_fn to check whether the PathSegments ends in test, such as #[tokio::test] or #[some_fancy_crate::test].

I tested this tarpaulin version against the issue that I was originally encountering, and it seems to fix it.
Before where #[tokio::test] was ignored: https://app.codecov.io/gh/kube-rs/kube/blob/cov-tweak/kube-runtime%2Fsrc%2Fcontroller%2Ffuture_hash_map.rs#L85
After where it's now included: https://app.codecov.io/gh/tyrone-wu/kube/blob/main/kube-runtime%2Fsrc%2Fcontroller%2Ffuture_hash_map.rs#L85

@tyrone-wu tyrone-wu marked this pull request as ready for review April 4, 2024 22:34
@xd009642
Copy link
Owner

xd009642 commented Apr 5, 2024

Cool thanks for this, don't worry about the beta and nightly failures, it's something I'm currently (slowly) working on 😓

@xd009642 xd009642 merged commit 2b05ebd into xd009642:develop Apr 5, 2024
8 of 21 checks passed
@tyrone-wu tyrone-wu mentioned this pull request Apr 5, 2024
15 tasks
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

Successfully merging this pull request may close these issues.

2 participants