File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -448,6 +448,7 @@ sh_test(
448
448
tags = [
449
449
"no-sandbox" ,
450
450
"no_windows" ,
451
+ "requires-network" , # For Bzlmod
451
452
],
452
453
)
453
454
Original file line number Diff line number Diff line change @@ -174,8 +174,16 @@ sh_test(
174
174
)
175
175
EOF
176
176
177
+ # The next line ensures that the test passes in IPv6-only networks on macOS.
178
+ if is_darwin; then
179
+ export JAVA_TOOL_OPTIONS=" -Djava.net.preferIPv6Addresses=true"
180
+ export STARTUP_OPTS=" --host_jvm_args=-Djava.net.preferIPv6Addresses=true"
181
+ else
182
+ export STARTUP_OPTS=" "
183
+ fi
184
+
177
185
# Test BAR is set from --action_env
178
- BAZ=fromaction bazel --ignore_all_rc_files test --test_output=all \
186
+ BAZ=fromaction bazel --ignore_all_rc_files $STARTUP_OPTS test --test_output=all \
179
187
--action_env=BAR=fromcli --action_env=BAZ \
180
188
//foo & > $TEST_log || fail " Test failed"
181
189
expect_log " foo: frombuild"
187
195
# Test FOO from the BUILD file wins
188
196
# Test BAR is set from --test_env
189
197
# Test BAZ is set from --test_env
190
- BAZ=fromtest bazel --ignore_all_rc_files test --test_output=all \
198
+ BAZ=fromtest bazel --ignore_all_rc_files $STARTUP_OPTS test --test_output=all \
191
199
--action_env=FOO=fromcli --test_env=FOO=fromcli --test_env=BAR=fromcli \
192
200
--test_env=BAZ //foo & > $TEST_log || fail " Test failed"
193
201
expect_log " foo: frombuild"
Original file line number Diff line number Diff line change @@ -129,6 +129,9 @@ sh_test(
129
129
"@bazel_tools//tools/bash/runfiles" ,
130
130
],
131
131
shard_count = 8 ,
132
+ tags = [
133
+ "requires-network" , # For Bzlmod
134
+ ],
132
135
)
133
136
134
137
sh_test (
You can’t perform that action at this time.
0 commit comments