Repository navigation
feat(rust): export the raw lcov report of rust_test targets - #51
Merged
Merged
Conversation
Keep the llvm-cov report as a declared test output, <name>.lcov: repository-relative paths, function records and, from the JSON export's sub-line regions, synthesized branch records for partly executed lines. Also stop merging raw profiles twice under Please, which doubled every execution count. Phase 2 of #46 for Rust. Adds a branchy fixture, unit tests, docs, a changelog entry for 0.6.0 and a CI smoke test. Refs #46 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 2 of #46, Rust. Each
rust_testkeeps thellvm-covreport as lcov, with the function (FN/FNDA) and branch (BRDA) records that Please's mergedcoverage.xml/coverage.jsondrop:plz-out/bin/<package>/<name>.lcov, repository-relative paths, toolchain and registry sources excluded. Uses the sharedtools/common/lcovpackage (feat(common): add shared lcov package #47).rustcemits no branch regions, soBRDArecords are synthesized fromllvm-cov export -format=textsub-line regions withlcov.AddRegionBranches(feat(common): derive partial-line branches from llvm-cov regions #50). Only lines that ran but contain a never-run sub-line region get one (e.g. the right side ofa && b). If the JSON export fails the report is still written, without them.TMP_DIRis the working directory, so the raw profiles were listed twice and merged twice, doubling every execution count. Line coverage was unaffected; the exported counts would have been wrong. They are now listed once (test added).please_rust test-runner --lcov-fileflag; docs; changelog. The[Unreleased]section (LLVM tool fix, docs) becomes0.6.0together with this new feature;VERSIONis bumped by the release workflow.Heuristic limits (documented)
A multi-line
if/elseis not a partial line: the untaken side shows up as an uncovered line. FN names are rustc v0-mangled.Test plan
plz test //...(96 tests): export built from realllvm-covlcov and JSON (toolchain file dropped, paths normalized, line 12 partial, uncalled function uncovered), no-JSON fallback, invalid input, empty reset, single listing of profilestest/rust/branches:branches_test: underplz coverFNDA:2for classify andFNDA:0for unused (counts correct after the profile fix),BRDA:12,0,0,0; a plainplz testleaves the file empty🤖 Generated with Claude Code