Skip to content

Commit

Permalink
Change _DEFAULT_TEST_RUNNER to use str(Label()) (#2399)
Browse files Browse the repository at this point in the history
Before this change, users would have to use `repo_name =
“build_bazel_rules_apple”` when using rules_apple with Bzlmod.

Signed-off-by: Brentley Jones <[email protected]>
  • Loading branch information
brentleyjones authored Feb 12, 2024
1 parent d275e0d commit afbd131
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion apple/ios.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ios_sticker_pack_extension = _ios_sticker_pack_extension
ios_imessage_extension = _ios_imessage_extension
ios_static_framework = _ios_static_framework

_DEFAULT_TEST_RUNNER = "@build_bazel_rules_apple//apple/testing/default_runner:ios_default_runner"
_DEFAULT_TEST_RUNNER = str(Label("//apple/testing/default_runner:ios_default_runner"))

def ios_unit_test(name, **kwargs):
runner = kwargs.pop("runner", None) or _DEFAULT_TEST_RUNNER
Expand Down
2 changes: 1 addition & 1 deletion apple/macos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def macos_dynamic_framework(name, **kwargs):
**bundling_args
)

_DEFAULT_TEST_RUNNER = "@build_bazel_rules_apple//apple/testing/default_runner:macos_default_runner"
_DEFAULT_TEST_RUNNER = str(Label("//apple/testing/default_runner:macos_default_runner"))

def macos_unit_test(name, **kwargs):
runner = kwargs.pop("runner", _DEFAULT_TEST_RUNNER)
Expand Down
2 changes: 1 addition & 1 deletion apple/tvos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tvos_extension = _tvos_extension
tvos_framework = _tvos_framework
tvos_static_framework = _tvos_static_framework

_DEFAULT_TEST_RUNNER = "@build_bazel_rules_apple//apple/testing/default_runner:tvos_default_runner"
_DEFAULT_TEST_RUNNER = str(Label("//apple/testing/default_runner:tvos_default_runner"))

def tvos_unit_test(name, **kwargs):
runner = kwargs.pop("runner", _DEFAULT_TEST_RUNNER)
Expand Down
2 changes: 1 addition & 1 deletion apple/visionos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ visionos_dynamic_framework = _visionos_dynamic_framework
visionos_framework = _visionos_framework
visionos_static_framework = _visionos_static_framework

_DEFAULT_TEST_RUNNER = "@build_bazel_rules_apple//apple/testing/default_runner:visionos_default_runner"
_DEFAULT_TEST_RUNNER = str(Label("//apple/testing/default_runner:visionos_default_runner"))

def visionos_unit_test(name, **kwargs):
runner = kwargs.pop("runner", _DEFAULT_TEST_RUNNER)
Expand Down
2 changes: 1 addition & 1 deletion apple/watchos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ watchos_framework = _watchos_framework
watchos_extension = _watchos_extension
watchos_static_framework = _watchos_static_framework

_DEFAULT_TEST_RUNNER = "@build_bazel_rules_apple//apple/testing/default_runner:watchos_default_runner"
_DEFAULT_TEST_RUNNER = str(Label("//apple/testing/default_runner:watchos_default_runner"))

def watchos_unit_test(name, **kwargs):
runner = kwargs.pop("runner", _DEFAULT_TEST_RUNNER)
Expand Down

0 comments on commit afbd131

Please sign in to comment.