tarpaulin: bug: tests fail when running cargo tarpaulin with recent nightly toolchain

Describe the bug We have been using tarpaulin for our project for quite some time.

We haven’t had any issues until now. We updated toolchain to more recent one -> nightly-2021-11-08.

And using tarpaulin to generate code coverage, our tests started failing. The tests produce different results than expected.

However, running just the tests without tarpaulin is fine and results are correct.

Note using any earlier toolchain than the one from 2021-11-08 is fine (eg. 2021-11-07 is fine ).

To Reproduce our project is quite complex, using even more complex Substrate framework.

However to reproduce - it is fairly simple:

  1. Clone repository Basilisk-node
  2. There is rust-toolchain file - edit to change toolchain to one from 2021-11-08.
  3. Run make coverage ( takes quite some time ). Fails.
  4. Run make test. Tests pass.

Expected behavior I’d expect tests not to fail considering they pass correctly without tarpaulin.

Personally, I cannot tell yet what can cause this issue.

I’ll dig deeper to figure out what have the failing tests in common - it is not obvious from the first quick look.

but I figured it would be good to let you know, as there might be something which you are already aware of.

Version cargo tarpaulin --version cargo-tarpauin version: 0.18.5

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (13 by maintainers)

Most upvoted comments

Brilliant, I’ll merge the PR then! And there should be a sponsor button somewhere as I do have github sponsors/patreon and the FUNDING.yml in the repo, but it’s not necessary unless you really want to 😅

Oohh I believe I see what’s happening, give me a sec and I’ll put up a PR for it for you to try out!

If you have time, if you could try https://github.com/xd009642/tarpaulin/pull/894 and let me know if it works. My laptop is quite weak so running the basilisk tests does take quite a lot of time 😅. Otherwise this fixes another issue that looks similar so I’ll likely do a release next week with this PR included

Sure. I will have a look and try it out later today. I’lllet you know.