Skip to content

ios_unit_test doesn't include bundles provided to data when using a test host #2876

@jflan-dd

Description

@jflan-dd

Resource bundles provided as data arguments to ios_unit_tests aren't bundled into the final .xctest bundle when using test_host.
It is included if test_host is None or if the bundle is provided to the resources argument instead.

apple_precompiled_resource_bundle(
    name = "SnapshotsData",
    bundle_id = "com.jflan.SnapshotsData",
    bundle_name = "Snapshots",
    infoplists = ["Info.plist],
    structured_resources = snapshot_images,
    tags = ["manual"],
)

ios_unit_test(
    name = "UnitTests",
    data = [":SnapshotsData"], # has to be `resources` to work with `test_host`
    minimum_os_version = minimum_os_version,
    runner = test_runner,
    test_host = "//MyApp",
    visibility = ["//visibility:public"],
    deps = [":UnitTests.library"],
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions