Repository navigation
coverage: apple post action merges xcodebuild raw profiles - #14509
TrapsterDK wants to merge 4 commits into
Conversation
|
/evidence platforms=["macos_arm64"] task=coverage scope=//apple/tests/fixtures/swift_app/... Generated by Claude Code |
|
Evidence started on |
|
The Generated by Claude Code |
|
/evidence platforms=["macos_arm64"] task=coverage scope=//apple/tests/fixtures/swift_app/... Generated by Claude Code |
|
Evidence started on |
|
The Generated by Claude Code |
|
Evidence run 44926835784 (macos_arm64, bf6ca27): My best guess is that Generated by Claude Code |
|
The Generated by Claude Code |
|
/evidence platforms=["macos_arm64"] task=coverage scope=//apple/tests/fixtures/swift_app/... Generated by Claude Code |
|
Evidence started on |
|
Evidence run 45012057904 (eea0a6c): all 6 tests pass, and So the source classification doesn't count the fixture's Swift files as eligible. That's the remaining step. Generated by Claude Code |
|
The new failures in Generated by Claude Code |
…14350) xcodebuild 16 leaves the test host's .profraw under TEST_TMPDIR/<simulator>/ and writes no Coverage.profdata, so rules_apple copies nothing and the report came out empty. When Coverage.profdata is missing, the post action now merges every .profraw under TEST_TMPDIR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hwAeheE4jLsoV6UTxj
…art of #14350) macOS evidence showed Xcode's clang runtime writes raw profile version 10, which the pinned llvm-profdata (version 11) rejects. Raw profiles now merge through `xcrun llvm-profdata`; Coverage.profdata still uses the pinned tool. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hwAeheE4jLsoV6UTxj
Under coverage, an instrumented Rust staticlib carries rustc's own profile runtime and counters next to Xcode's, and the app's raw profile fails to merge (number of counters is zero). Swift sources keep their coverage; Rust code gets coverage from its own tests. Part of #14350. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hyWgXAuKZTkQf9BoEE
Evidence run 45012057904 wrote a non-empty coverage.dat for LedgerKit.swift, but the accounting classified .swift as unsupported, so the cell had no eligible lines and failed coverage_below_minimum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xut2hxcqqAoDeuSr83mscS
eea0a6c to
6c1c543
Compare
|
Rebased onto main (5bf6454). 6c1c543 fixes what was left after run 45012057904. That run's report was non-empty, but Local (linux_x86_64): Evidence dispatched (macos_arm64, 🤖 Generated with Claude Code |
|
Evidence run 45170989636 (6c1c543): 6/6 tests pass and The uncovered lines are Generated by Claude Code |
Pull Request
Linked Issue
Closes #14350
Changes
ledger_app_test/test.log) shows that xcodebuild writes noCoverage.profdatafor rules_apple to copy. It leaves the test host's raw profile atTEST_TMPDIR/test_tmp_dir.*/<simulator>/<uuid>-<pid>.profraw, andTEST_BINARIES_FOR_LLVM_COVis set.tools/coverage/collect/src/apple_post.rs: whenCoverage.profdatais missing, the post action now merges every.profrawunderTEST_TMPDIRand exports LCOV from that. If there is no profdata and no profraw, it still writes an empty report and says so.xcrun llvm-profdata. Evidence run 44912255171 showed Xcode's runtime writes raw profile version 10, and the pinned llvm-profdata, which expects version 11, rejects it.Coverage.profdatastill merges with the pinned tool, andllvm-cov exportstill uses the pinned llvm-cov.apple/private/ios/app.bzl: the app's Rustlibrarynow builds throughno_coverage_transition. Evidence run 44926835784 failed withmalformed instrumentation profile data: number of counters is zero. An instrumented Rust staticlib carries rustc's own profile runtime and counters next to Xcode's, so the mixed raw profile cannot be read. Swift sources keep their coverage, and Rust code gets coverage from its own tests.raw_profiles,merge_programand the updated message.Verification
Tested:
//tools/coverage/collect:collect_native_testpassed (linux_x86_64) at bf6ca27. At eea0a6c,bazel test //apple/tests:allpassed on linux_x86_64 (79 pass, 11 macOS-only skipped).tools/dx check --applyonapple_post.rsandapple/private/ios/app.bzlreported no findings.Evidence (macos_arm64,
coverage //apple/tests/fixtures/swift_app/...): a run on eea0a6c is requested below. Draft until it reports non-empty LCOV forLedgerKit.swift.🤖 Generated with Claude Code
https://claude.ai/code/session_01Xut2hwAeheE4jLsoV6UTxj