You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running bazel coverage against an ios_unit_test target that depends on an apple_framework target with link_dynamic = 1, the coverage report generated does not include the files from the apple_framework target. If link_dynamic = 0, those files are included in the coverage report.
The solution to this is to include the apple_framework target dependency to the frameworks attribute of the ios_unit_test. rules_apple decides which binaries to pass as arguments to xcrun llvm. Without adding it to the frameworks attribute, only the test binary is passed as an argument, so it works for statically linked framework but not dynamically linked. Adding the framework to the frameworks attribute of the ios_unit_test gets the framework added as a binary argument to xcrun llvm in addition to the unit tests which results in coverage on the framework when linked dynamically.
When running
bazel coverage
against anios_unit_test
target that depends on anapple_framework
target withlink_dynamic = 1
, the coverage report generated does not include the files from the apple_framework target. Iflink_dynamic = 0
, those files are included in the coverage report.See https://github.com/mccorkill1/CoverageExample for an example with instructions in the readme to recreate the problem.
The text was updated successfully, but these errors were encountered: