diff --git a/rules/test.bzl b/rules/test.bzl index bf8f1a47d..1dec55a13 100644 --- a/rules/test.bzl +++ b/rules/test.bzl @@ -21,6 +21,7 @@ _IOS_TEST_KWARGS = [ "frameworks", "provisioning_profile", "test_filter", + "exec_properties", ] def _ios_test(name, test_rule, test_suite_rule, apple_library, infoplists_by_build_setting = {}, split_name_to_kwargs = {}, **kwargs): @@ -46,6 +47,11 @@ def _ios_test(name, test_rule, test_suite_rule, apple_library, infoplists_by_bui testonly = kwargs.pop("testonly", True) ios_test_kwargs = {arg: kwargs.pop(arg) for arg in _IOS_TEST_KWARGS if arg in kwargs} ios_test_kwargs["data"] = kwargs.pop("test_data", []) + + test_exec_properties = kwargs.pop("test_exec_properties", None): + if test_exec_properties: + ios_test_kwargs["exec_properties"] = test_exec_properties + if ios_test_kwargs.get("test_host", None) == True: ios_test_kwargs["test_host"] = "@build_bazel_rules_ios//rules/test_host_app:iOS-%s-AppHost" % ios_test_kwargs.get("minimum_os_version") diff --git a/tests/ios/app/BUILD.bazel b/tests/ios/app/BUILD.bazel index b468aebc7..340295af2 100644 --- a/tests/ios/app/BUILD.bazel +++ b/tests/ios/app/BUILD.bazel @@ -250,6 +250,7 @@ ios_unit_test( srcs = ["infoplist_test.m"], minimum_os_version = "10.0", test_host = ":AppWithInfoPlist", + test_exec_properties = {}, ) # Configurable xcconfig, infoplist and entitlements