Skip to content

Commit

Permalink
Fix unit test attr forwarding
Browse files Browse the repository at this point in the history
The `test.bzl` macros were incorrectly forwarding some of the attrs like `features`. This was leading to silent errors where things passed via `features` were dropped (such as main thread checking).
This PR fixes the macro by properly forwarding ALL supported unit test attrs to the unit test rule.
  • Loading branch information
luispadron committed Nov 18, 2024
1 parent 18cd914 commit 5c042d8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions rules/test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,12 @@ def _make_test(name, test_rule, **kwargs):
Helper to create an individual test
"""
runner = kwargs.pop("runner", None) or _DEFAULT_APPLE_TEST_RUNNER
test_attrs = {k: v for (k, v) in kwargs.items() if k not in _APPLE_BUNDLE_ATTRS}
test_attrs = {k: v for (k, v) in kwargs.items() if k in _IOS_TEST_KWARGS}

test_rule(
name = name,
runner = runner,
test_host = kwargs.pop("test_host", None),
deps = kwargs.pop("deps", []),
testonly = kwargs.pop("testonly", True),
minimum_os_version = kwargs.pop("minimum_os_version"),
**test_attrs
)

Expand Down

0 comments on commit 5c042d8

Please sign in to comment.