I run cargo-tarpaulin on CI using stable Rust with --workspace --all-features -- --test-threads 1 as arguments. This worked fine, but with version 0.18.1 I get an empty coverage result. I noticed it first on this PR which only modifies documentation, so should not have any effect on the coverage.
I did not modify the CI environment. The only difference is that tarpaulin released a new version, which got picked up.
I can reproduce the problem locally too, by installing either version 0.18.0, which works as expected, or version 0.18.1, which shows 0 coverage. I could reproduce it with cargo 1.54.0 (5ae8d74b3 2021-06-22) and cargo 1.56.0-nightly (cc17afbb0 2021-08-02). I used the serde_with crate to verify the bug.
The problem seems to be that --test-threads 1 no longer specifies a number of threads, but gets interpreted as a filter which tests to run. None of the tests run, thus I get a 0 coverage.
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out; finished in 0.00s
I would expect that the version of tarpaulin has no effect on how these arguments are parsed, since this way worked since at least 1.5 years without problems. It seems that --test-threads=1 (with an = sign) still works and limits the testing to a single thread.
I run cargo-tarpaulin on CI using stable Rust with
--workspace --all-features -- --test-threads 1
as arguments. This worked fine, but with version 0.18.1 I get an empty coverage result. I noticed it first on this PR which only modifies documentation, so should not have any effect on the coverage.I did not modify the CI environment. The only difference is that tarpaulin released a new version, which got picked up. I can reproduce the problem locally too, by installing either version 0.18.0, which works as expected, or version 0.18.1, which shows 0 coverage. I could reproduce it with
cargo 1.54.0 (5ae8d74b3 2021-06-22)
andcargo 1.56.0-nightly (cc17afbb0 2021-08-02)
. I used theserde_with
crate to verify the bug.The problem seems to be that
--test-threads 1
no longer specifies a number of threads, but gets interpreted as a filter which tests to run. None of the tests run, thus I get a 0 coverage.I would expect that the version of tarpaulin has no effect on how these arguments are parsed, since this way worked since at least 1.5 years without problems. It seems that
--test-threads=1
(with an=
sign) still works and limits the testing to a single thread.