Skip to content

Commit

Permalink
Fix labels for Bazel HEAD (#330)
Browse files Browse the repository at this point in the history
Needed to cherry-pick d5a60a6.
  • Loading branch information
brentleyjones authored May 17, 2024
1 parent ac15063 commit 85792ef
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 41 deletions.
10 changes: 2 additions & 8 deletions test/available_xcodes_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,8 @@
"""Tests for the `available_xcodes` rule."""

load("@bazel_skylib//lib:unittest.bzl", "analysistest")
load(
"@build_bazel_apple_support//xcode:available_xcodes.bzl",
"available_xcodes",
)
load(
"@build_bazel_apple_support//xcode:xcode_version.bzl",
"xcode_version",
)
load("//xcode:available_xcodes.bzl", "available_xcodes")
load("//xcode:xcode_version.bzl", "xcode_version")
load(":test_helpers.bzl", "FIXTURE_TAGS", "make_all_tests")

visibility("private")
Expand Down
2 changes: 1 addition & 1 deletion test/shell/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ filegroup(
name = "for_bazel_tests",
testonly = True,
srcs = [
"//:for_bazel_tests",
"//test:for_bazel_tests",
"@build_bazel_apple_support//:for_bazel_tests",
],
)

Expand Down
47 changes: 27 additions & 20 deletions test/xcode_config_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,9 @@
"""Tests for the `xcode_config` rule."""

load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts")
load(
"@build_bazel_apple_support//xcode:available_xcodes.bzl",
"available_xcodes",
)
load(
"@build_bazel_apple_support//xcode:xcode_config.bzl",
"xcode_config",
)
load(
"@build_bazel_apple_support//xcode:xcode_version.bzl",
"xcode_version",
)
load("//xcode:available_xcodes.bzl", "available_xcodes")
load("//xcode:xcode_config.bzl", "xcode_config")
load("//xcode:xcode_version.bzl", "xcode_version")
load(":test_helpers.bzl", "FIXTURE_TAGS", "make_all_tests")

visibility("private")
Expand Down Expand Up @@ -233,7 +224,9 @@ _accepts_flag_for_mutually_available_test = analysistest.make(
_accepts_flag_for_mutually_available_test_impl,
config_settings = {
"//command_line_option:xcode_version": "8.4",
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:accepts_flag_for_mutually_available__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:accepts_flag_for_mutually_available__foo",
)),
},
)

Expand Down Expand Up @@ -276,7 +269,9 @@ _prefers_flag_over_mutually_available_test = analysistest.make(
_prefers_flag_over_mutually_available_test_impl,
config_settings = {
"//command_line_option:xcode_version": "5.1.2",
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:prefers_flag_over_mutually_available__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:prefers_flag_over_mutually_available__foo",
)),
},
)

Expand Down Expand Up @@ -322,7 +317,9 @@ _warn_with_explicit_local_only_version_test = analysistest.make(
_warn_with_explicit_local_only_version_test_impl,
config_settings = {
"//command_line_option:xcode_version": "8.4",
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:warn_with_explicit_local_only_version__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:warn_with_explicit_local_only_version__foo",
)),
},
)

Expand Down Expand Up @@ -367,7 +364,9 @@ def _prefer_local_default_if_no_mutual_no_flag_different_main_version_test_impl(
_prefer_local_default_if_no_mutual_no_flag_different_main_version_test = analysistest.make(
_prefer_local_default_if_no_mutual_no_flag_different_main_version_test_impl,
config_settings = {
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:prefer_local_default_if_no_mutual_no_flag_different_main_version__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:prefer_local_default_if_no_mutual_no_flag_different_main_version__foo",
)),
},
)

Expand Down Expand Up @@ -412,7 +411,9 @@ def _prefer_local_default_if_no_mutual_no_flag_different_build_alias_test_impl(c
_prefer_local_default_if_no_mutual_no_flag_different_build_alias_test = analysistest.make(
_prefer_local_default_if_no_mutual_no_flag_different_build_alias_test_impl,
config_settings = {
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:prefer_local_default_if_no_mutual_no_flag_different_build_alias__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:prefer_local_default_if_no_mutual_no_flag_different_build_alias__foo",
)),
},
)

Expand Down Expand Up @@ -457,7 +458,9 @@ def _prefer_local_default_if_no_mutual_no_flag_different_full_version_test_impl(
_prefer_local_default_if_no_mutual_no_flag_different_full_version_test = analysistest.make(
_prefer_local_default_if_no_mutual_no_flag_different_full_version_test_impl,
config_settings = {
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:prefer_local_default_if_no_mutual_no_flag_different_full_version__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:prefer_local_default_if_no_mutual_no_flag_different_full_version__foo",
)),
},
)

Expand Down Expand Up @@ -505,7 +508,9 @@ def _choose_newest_mutual_xcode_test_impl(ctx):
_choose_newest_mutual_xcode_test = analysistest.make(
_choose_newest_mutual_xcode_test_impl,
config_settings = {
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:choose_newest_mutual_xcode__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:choose_newest_mutual_xcode__foo",
)),
},
)

Expand Down Expand Up @@ -541,7 +546,9 @@ _invalid_xcode_from_mutual_throws_test = analysistest.make(
_invalid_xcode_from_mutual_throws_test_impl,
config_settings = {
"//command_line_option:xcode_version": "6",
"//command_line_option:xcode_version_config": "@build_bazel_apple_support//test:invalid_xcode_from_mutual_throws__foo",
"//command_line_option:xcode_version_config": str(Label(
"//test:invalid_xcode_from_mutual_throws__foo",
)),
},
expect_failure = True,
)
Expand Down
10 changes: 2 additions & 8 deletions test/xcode_support_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,8 @@
# limitations under the License.
"""Definition of a test rule to test xcode_support."""

load(
"//lib:apple_support.bzl",
"apple_support",
)
load(
"//lib:xcode_support.bzl",
"xcode_support",
)
load("//lib:apple_support.bzl", "apple_support")
load("//lib:xcode_support.bzl", "xcode_support")

# Template for the test script used to validate that the action outputs contain the expected
# values.
Expand Down
5 changes: 1 addition & 4 deletions test/xcode_version_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
"""Tests for the `xcode_version` rule."""

load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts")
load(
"@build_bazel_apple_support//xcode:xcode_version.bzl",
"xcode_version",
)
load("//xcode:xcode_version.bzl", "xcode_version")
load(":test_helpers.bzl", "FIXTURE_TAGS", "make_all_tests")

visibility("private")
Expand Down

0 comments on commit 85792ef

Please sign in to comment.