Skip to content

Commit

Permalink
[RBE] Plumb missing exec_properties field
Browse files Browse the repository at this point in the history
Thank to bazelbuild/bazel#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
  • Loading branch information
jerrymarino committed Feb 24, 2023
1 parent ea40a7b commit e1b1b8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rules/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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")

Expand Down
1 change: 1 addition & 0 deletions tests/ios/app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1b1b8d

Please sign in to comment.