-
-
Notifications
You must be signed in to change notification settings - Fork 1
The coverage-helper::test doesn't work with tokio::test #2
Comments
As said in taiki-e/cargo-llvm-cov#273, tokio::test refers ::core::prelude::v1::test, so it's not working with coverage_helper. The most desirable fix is to change libtest so that the test attribute gets no_coverage, and the second most desirable is to make the change on the tokio side. |
This problem may have been resolved by tokio-macros 2.3.0, which includes tokio-rs/tokio#6497. |
And so, what are we supposed to write in the tests using EDIT : ok I understand, the version 2.3.0 of tokio-macros may have solved it without any change. I’ve updated to tokio 1.40.0 and the problem remains. |
any update? |
No update on this issue, but the |
#[coverage(off)] attribute has been stabilized in rust-lang/rust#130766 (will be included in Rust 1.85). I will deprecate coverage-helper in favor of the pattern that is now documented in cargo-llvm-cov: taiki-e/cargo-llvm-cov#123 (comment)
|
Hi, @taiki-e.
Currently, the implementation of coverage_helper replaces
std::test
withcoverage_helper::test
. However, this approach doesn't work fortokio::test
. Given thattokio::test
is widely used, shall we supporttokio::test
in this crate?IMO, we can provide a
tokio
module incoverage_helper
, like:What do you think? If this approach is feasible, I can do some contributions.
The text was updated successfully, but these errors were encountered: