From e1b1b8dd492a699a79b5deb6a582ed1e86083d6e Mon Sep 17 00:00:00 2001 From: Jerry Marino Date: Fri, 24 Feb 2023 11:22:50 -0800 Subject: [PATCH] [RBE] Plumb missing exec_properties field Thank to https://github.com/bazelbuild/bazel/issues/10799 we now have `exec_properties` and the tests are missing `exec_properties`, so set them. If you have different exec properties for inputs, you can set them with `exec_properties` Conditional to not expand the size of the action graph --- rules/test.bzl | 6 ++++++ tests/ios/app/BUILD.bazel | 1 + 2 files changed, 7 insertions(+) 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