RFC: Native iOS code coverage support#83
Draft
mfazekas wants to merge 1 commit intocallstackincubator:mainfrom
Draft
RFC: Native iOS code coverage support#83mfazekas wants to merge 1 commit intocallstackincubator:mainfrom
mfazekas wants to merge 1 commit intocallstackincubator:mainfrom
Conversation
|
@mfazekas is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
Add LLVM source-based profiling for native Swift/ObjC code via a new @react-native-harness/coverage-ios package. Users specify pods to instrument in rn-harness.config.mjs and coverage flags are injected automatically at pod install time via Module.prepend on Pod::Installer.
6a33bbf to
8cd29d8
Compare
Contributor
Author
|
@V3RON any feedback on this PR adding native code coverage?! |
Contributor
|
Hey @mfazekas 👋 |
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
Adds native iOS code coverage (LLVM profiling) for Swift/ObjC code exercised by harness tests. Users specify which pods to instrument in
rn-harness.config.mjs— no Podfile changes required.@react-native-harness/coverage-iospackage: shipsHarnessCoverageHelper.swift+HarnessCoverageSetup.mas an auto-linked pod, plus aModule.prependhook onPod::Installerthat reads the config and injects coverage compilation flags at pod install timecoverage.native.ios.pods: string[]platform-iospulls.profrawfiles from the simulator, merges viallvm-profdata, and generatesnative-coverage.lcovInspired by rive-app/rive-nitro-react-native#190
Test plan
coverage.native.ios.podsto playground config, runpod install, verify coverage flags on target pods--coverage, verify.profrawfiles in simulator Documents dirnative-coverage.lcovoutputcoverage.native.ios