Skip to content

Commit

Permalink
Flip --incompatible_check_sharding_support
Browse files Browse the repository at this point in the history
RELNOTES[INC]: `--incompatible_check_sharding_support` is enabled by default. Sharded tests with test runners that do not properly advertise support for test sharding will fail. Refer to bazelbuild#18339 for migration advice.
  • Loading branch information
fmeum committed May 9, 2023
1 parent 7fee4d1 commit 72691ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public static class TestOptions extends FragmentOptions {

@Option(
name = "incompatible_check_sharding_support",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
effectTags = {OptionEffectTag.UNKNOWN},
Expand Down
1 change: 1 addition & 0 deletions src/test/py/bazel/test_wrapper_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def _CreateMockWorkspace(self):
'bat_test(',
' name = "sharded_test",',
' content = [',
' "type nul > %TEST_SHARD_STATUS_FILE%",',
' "@echo STATUS=%TEST_SHARD_STATUS_FILE%",',
' "@echo INDEX=%TEST_SHARD_INDEX% TOTAL=%TEST_TOTAL_SHARDS%",',
' ],',
Expand Down
5 changes: 3 additions & 2 deletions src/test/shell/bazel/bazel_test_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -540,9 +540,10 @@ EOF
function test_xml_fallback_for_sharded_test() {
mkdir -p dir

cat <<EOF > dir/test.sh
cat <<'EOF' > dir/test.sh
#!/bin/sh
exit \$((TEST_SHARD_INDEX == 1))
touch "$TEST_SHARD_STATUS_FILE"
exit $((TEST_SHARD_INDEX == 1))
EOF

chmod +x dir/test.sh
Expand Down

0 comments on commit 72691ad

Please sign in to comment.