-
-
Notifications
You must be signed in to change notification settings - Fork 189
Description
Describe the bug
I am not seeing any collected coverage data from child executables despite using --follow-exec
(with --engine llvm
, otherwise I get a segfault).
I know that this same workflow used to work in an earlier combination of rustc+tarpaulin, because I had these steps written down.
To Reproduce
For now, the only repro I have uses my own project:
git clone https://github.com/DenialAdams/roland.git
RUSTFLAGS="-Cinstrument-coverage -Cstrip=none -Clink-dead-code -Cdebuginfo=2" cargo build --bin rolandc_cli
cargo tarpaulin --skip-clean --implicit-test-threads --follow-exec --engine llvm --command build --bin roland_test_runner -o html -- {{justfile_directory()}}/tests/ --cli {{justfile_directory()}}/target/debug/rolandc_cli
Observe that coverage data is found only for the test runner itself. There is no test data accumulated for the compiler:
2025-01-21T05:54:40.354193Z INFO cargo_tarpaulin::report: Coverage Results:
|| Tested/Total Lines:
|| roland_test_runner/src/main.rs: 159/275
|| rolandc/src/backend/qbe.rs: 0/5
|| rolandc/src/backend/wasm.rs: 0/20
|| rolandc/src/error_handling.rs: 0/62
|| rolandc/src/imports.rs: 0/76
|| rolandc/src/lib.rs: 0/177
|| rolandc/src/parse.rs: 0/8
|| rolandc/src/pp.rs: 0/295
|| rolandc/src/semantic_analysis/validator.rs: 0/245
|| rolandc/src/type_data.rs: 0/147
|| rolandc_cli/src/main.rs: 0/2
|| rolandc_lsp/src/main.rs: 0/9
Expected behavior
Coverage is collected for the spawned executables in addition to the main executable under test.
Thanks very much :)