Skip to content

Commit 18f3b55

Browse files
hlopkocopybara-github
authored andcommitted
Add Bazel bootstrap test for C++ rules using platforms
#6516 #7260. RELNOTES: None. PiperOrigin-RevId: 238409948
1 parent 774da7c commit 18f3b55

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/test/shell/bazel/bazel_bootstrap_distfile_test.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ else
7070
fi
7171

7272
function test_bootstrap() {
73+
execute_bootstrap "--host_javabase=@local_jdk//:jdk"
74+
}
75+
76+
# TODO(#7260): Remove this test once this flag is flipped
77+
function test_bootstrap_with_cc_rules_using_platforms() {
78+
execute_bootstrap "--host_javabase=@local_jdk//:jdk "\
79+
"--incompatible_enable_cc_toolchain_resolution"
80+
}
81+
82+
function execute_bootstrap() {
7383
cd "$(mktemp -d ${TEST_TMPDIR}/bazelbootstrap.XXXXXXXX)"
7484
export SOURCE_DATE_EPOCH=1501234567
7585
unzip -q "${DISTFILE}"
@@ -80,7 +90,7 @@ function test_bootstrap() {
8090
fi
8191
JAVABASE=$(echo reduced*)
8292

83-
env EXTRA_BAZEL_ARGS="--host_javabase=@local_jdk//:jdk" ./compile.sh \
93+
env EXTRA_BAZEL_ARGS="${1}" ./compile.sh \
8494
|| fail "Expected to be able to bootstrap bazel"
8595
./output/bazel \
8696
--server_javabase=$JAVABASE --host_jvm_args=--add-opens=java.base/java.nio=ALL-UNNAMED \

0 commit comments

Comments
 (0)