Skip to content

Find Swift Test Coverage in Either Build System's Layout - #39

Merged
PSchmiedmayer merged 1 commit into
mainfrom
feature/swift-test-coverage-layout
Sep 24, 2026
Merged

PSchmiedmayer merged 1 commit into
mainfrom
feature/swift-test-coverage-layout

Conversation

@PSchmiedmayer

Copy link
Copy Markdown
Contributor

♻️ Current situation & Problem

Swift 6.4's default build system writes its products to .build/out/Products/<Config>-<platform>, with one <Target>Tests.so per test target instead of a .xctest.
The coverage step of swift-test.yml only searched the native layout (.build/<triple>/<config>/codecov and *.xctest), found nothing, and llvm-cov export failed with "exactly one of -instr-profile and -empty-profile must be specified".
Every caller that sets artifact_name fails on Swift 6.4 even though its tests pass, for example SchmiedmayerLab/MyHeartCounts-iOS#204.

⚙️ Release Notes

  • Find the coverage profile and the test binaries in either build system's layout, and export coverage from every test binary, passing additional ones as -object.

📚 Documentation

A two-line comment in the step names both layouts.

✅ Testing

actionlint passes.
The exact step was run in Swift 6.4 on Linux against MyHeartCountsShared: with the default build system it exports 402 LCOV records from the test .so, and with --build-system native 342 records from the .xctest.

Code of Conduct & Contributing Guidelines

@coderabbitai

coderabbitai Bot commented Sep 24, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 05f637dc-c678-4611-a5e3-79047ac57188


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PSchmiedmayer
PSchmiedmayer merged commit a535e2f into main Sep 24, 2026
6 checks passed
@PSchmiedmayer
PSchmiedmayer deleted the feature/swift-test-coverage-layout branch September 24, 2026 15:39
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

Successfully merging this pull request may close these issues.

1 participant