Fixing missing data for ios_unit_test (#28689)
This commit is contained in:
parent
b762dce244
commit
26ee00db1e
|
|
@ -31,6 +31,7 @@ load("//bazel:cc_grpc_library.bzl", "cc_grpc_library")
|
|||
load("//bazel:copts.bzl", "GRPC_DEFAULT_COPTS")
|
||||
load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library", "upb_proto_reflection_library")
|
||||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test")
|
||||
load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner")
|
||||
|
||||
# The set of pollers to test against if a test exercises polling
|
||||
POLLERS = ["epollex", "epoll1", "poll"]
|
||||
|
|
@ -230,26 +231,32 @@ def ios_cc_test(
|
|||
tags: The tags to apply to the test.
|
||||
**kwargs: All other arguments to apply.
|
||||
"""
|
||||
ios_test_adapter = "//third_party/objective_c/google_toolbox_for_mac:GTM_GoogleTestRunner_GTM_USING_XCTEST"
|
||||
|
||||
test_lib_ios = name + "_test_lib_ios"
|
||||
ios_tags = tags + ["manual", "ios_cc_test"]
|
||||
test_runner = "ios_x86_64_sim_runner_" + name
|
||||
ios_test_runner(
|
||||
name = test_runner,
|
||||
device_type = "iPhone X",
|
||||
)
|
||||
if not any([t for t in tags if t.startswith("no_test_ios")]):
|
||||
native.objc_library(
|
||||
name = test_lib_ios,
|
||||
srcs = kwargs.get("srcs"),
|
||||
deps = kwargs.get("deps"),
|
||||
copts = kwargs.get("copts"),
|
||||
data = kwargs.get("data"),
|
||||
tags = ios_tags,
|
||||
alwayslink = 1,
|
||||
testonly = 1,
|
||||
)
|
||||
ios_test_deps = [ios_test_adapter, ":" + test_lib_ios]
|
||||
ios_test_deps = [":" + test_lib_ios]
|
||||
ios_unit_test(
|
||||
name = name + "_on_ios",
|
||||
size = kwargs.get("size"),
|
||||
data = kwargs.get("data"),
|
||||
tags = ios_tags,
|
||||
minimum_os_version = "9.0",
|
||||
runner = test_runner,
|
||||
deps = ios_test_deps,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue