Skip to content

Tests generated by the ios_unit_test target take very long time to run #607

@acecilia

Description

@acecilia

Hello:

I am making a sample repository for bazel, in order to see if it will fit my needs for ios development.

In order to create a test target for a swift library I am using ios_unit_test, and doing the following:

def swift_test_interface(
    name,
    srcs,
    deps,
    ):
    test_lib_name = name + "Lib"

    swift_library(
        name = test_lib_name,
        srcs = srcs,
        deps = deps,
    )

    ios_unit_test(
        name = name,
        deps = [":" + test_lib_name],
        minimum_os_version = "10.0",
    )

When running unit tests for swift libraries:

Expectation: they run in the order of ms .
Reality: they are taking usually 15 seconds to run, or even more.

You can see this in CI here:

The source code is here: https://github.com/acecilia/BazelVSBuckSample

I already tried to find a similar problem in the issues in this repository, and in the bazel github repository. The only issue that I could find that may be related to this is bazelbuild/bazel#2985 (comment).

Any idea why those tests are taking so long?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Would be nice, but probably next quarter at the earliesttype: customer issueThis issue is not a problem with the codebase, but an issue a customer is having.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions