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

couldn't be interpretted: missing section: CoverageFunctions #1623

Open
lcmgh opened this issue Sep 17, 2024 · 1 comment
Open

couldn't be interpretted: missing section: CoverageFunctions #1623

lcmgh opened this issue Sep 17, 2024 · 1 comment
Assignees

Comments

@lcmgh
Copy link

lcmgh commented Sep 17, 2024

In my integration tests I am spawning my app via Command triggered cargo run.

When executing cargo tarpaulin --follow-exec I am getting some errors

2024-09-17T12:25:29.431195Z  INFO cargo_tarpaulin::statemachine::instrumented: For binary: target/debug/deps/app-7bb51c4783d6a2f3
2024-09-17T12:25:29.431211Z  INFO cargo_tarpaulin::statemachine::instrumented: Generated: target/tarpaulin/profraws/amdemo-7bb51c4783d6a2f3_5880590785421624853_0-11505.profraw
2024-09-17T12:25:29.431214Z  INFO cargo_tarpaulin::statemachine::instrumented: Merging coverage reports
2024-09-17T12:25:29.666884Z  INFO cargo_tarpaulin::statemachine::instrumented: Mapping coverage data to source
2024-09-17T12:25:29.678600Z ERROR llvm_profparser::coverage::coverage_mapping: /Users/app/target/debug/app couldn't be interpretted: missing section: CoverageFunction

Still I am getting

15.31% coverage, 81/529 lines covered, +15.31% change in coverage

tarpaulin 0.31.2
latest macos

@xd009642
Copy link
Owner

The coverage functions section is the first one I try, so likely the spawned binaries haven't been built with the instrumentation enabled. If you add --print-rust-flags to your CLI prompt and then set that as your RUSTFLAGS env var before the spawned command is built you might get the coverage information as expected

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

No branches or pull requests

2 participants