8000 Flip `--@bazel_tools//tools/test:incompatible_use_default_test_toolch… · coderabbit-test/bazel@0dd0da9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0dd0da9

Browse files
fmeumcopybara-github
authored andcommitted
Flip --@bazel_tools//tools/test:incompatible_use_default_test_toolchain
Fixes bazelbuild#25823 RELNOTES[inc]: `--@bazel_tools//tools/test:incompatible_use_default_test_toolchain` is now enabled by default. All test rules without an explicitly defined `test` exec group now select an execution platform that satisfies all constraints of the target platform. The `--use_target_platform_for_tests` option, which served a similar purpose, is now deprecated. See bazelbuild#25823 for more details and migration advice. Closes bazelbuild#25821. PiperOrigin-RevId: 747439988 Change-Id: Ia0c3c8463be85ed60ca456ef6887ca4a92045e65
1 parent 19f4a8a commit 0dd0da9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,10 @@ public OutputPathsConverter() {
953953
// target.
954954
@Option(
955955
name = "use_target_platform_for_tests",
956+
deprecationWarning =
957+
"Tests select an execution platform matching all constraints of the target platform by"
958+
+ " default. Instead of using this flag, make sure that all test target platform are"
959+
+ " registered as execution platforms.",
956960
defaultValue = "false",
957961
documentationCategory = OptionDocumentationCategory.EXECUTION_STRATEGY,
958962
effectTags = {OptionEffectTag.EXECUTION},

src/test/java/com/google/devtools/build/lib/analysis/mock/BazelAnalysisMock.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def _impl(ctx):
128128
""");
129129
config.create(
130130
"embedded_tools/tools/jdk/BUILD",
131-
"""
131+
"""
132132
load("@rules_java//java:defs.bzl",
133133
"java_binary", "java_import", "java_toolchain", "java_runtime")
134134
load(
@@ -316,7 +316,7 @@ def _impl(ctx):
316316
317317
bool_flag(
318318
name = "incompatible_use_default_test_toolchain",
319-
build_setting_default = False,
319+
build_setting_default = True,
320320
visibility = ["//visibility:private"],
321321
)
322322

tools/test/BUILD.tools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ empty_toolchain(name = "empty_toolchain")
2929
# platform.
3030
bool_flag(
3131
name = "incompatible_use_default_test_toolchain",
32-
build_setting_default = False,
32+
build_setting_default = True,
3333
visibility = ["//visibility:private"],
3434
)
3535

0 commit comments

Comments
 (0)
0