Skip to content

Commit

Permalink
Flip incompatible_exclusive_test_sandboxed
Browse files Browse the repository at this point in the history
Solves #3791 #16871 bazel-contrib/SIG-rules-authors#40
Steps to do before merging:

- [x] Bazel checks green #16868
- [x] Downstream projects green https://buildkite.com/bazel/bazelisk-plus-incompatible-flags/builds/1348

Closes #16867.

PiperOrigin-RevId: 493257706
Change-Id: I0f46d092a47a7c08e2436183c9cdc2cd92a0c379
  • Loading branch information
gasparev authored and copybara-github committed Dec 6, 2022
1 parent 2e2f5d9 commit 23580aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public static class TestOptions extends FragmentOptions {

@Option(
name = "incompatible_exclusive_test_sandboxed",
defaultValue = "false",
defaultValue = "true",
documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {OptionMetadataTag.INCOMPATIBLE_CHANGE},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public void testTestWithCpusTagHasCorrectLocalResourcesEstimate() throws Excepti

@Test
public void testTestWithExclusiveRunLocallyByDefault() throws Exception {
useConfiguration("--noincompatible_exclusive_test_sandboxed");
scratch.file("tests/test.sh", "#!/bin/bash", "exit 0");
scratch.file(
"tests/BUILD",
Expand All @@ -73,6 +74,7 @@ public void testTestWithExclusiveRunLocallyByDefault() throws Exception {

@Test
public void testTestWithExclusiveIfRunLocally_notTaggedLocal() throws Exception {
useConfiguration("--noincompatible_exclusive_test_sandboxed");
scratch.file("tests/test.sh", "#!/bin/bash", "exit 0");
scratch.file(
"tests/BUILD",
Expand All @@ -93,7 +95,6 @@ public void testTestWithExclusiveIfRunLocally_notTaggedLocal() throws Exception

@Test
public void testTestWithExclusiveDisablesRemoteExecution() throws Exception {
useConfiguration("--incompatible_exclusive_test_sandboxed");
scratch.file("tests/test.sh", "#!/bin/bash", "exit 0");
scratch.file(
"tests/BUILD",
Expand All @@ -113,7 +114,6 @@ public void testTestWithExclusiveDisablesRemoteExecution() throws Exception {

@Test
public void testTestWithExclusiveIfRunLocally_notTaggedNoRemote() throws Exception {
useConfiguration("--incompatible_exclusive_test_sandboxed");
scratch.file("tests/test.sh", "#!/bin/bash", "exit 0");
scratch.file(
"tests/BUILD",
Expand Down
2 changes: 0 additions & 2 deletions src/test/shell/bazel/remote/remote_execution_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2045,12 +2045,10 @@ sh_test(
EOF

bazel test \
--incompatible_exclusive_test_sandboxed \
--remote_cache=grpc://localhost:${worker_port} \
//a:success_test || fail "Failed to test //a:success_test"

bazel test \
--incompatible_exclusive_test_sandboxed \
--remote_cache=grpc://localhost:${worker_port} \
--nocache_test_results \
//a:success_test >& $TEST_log || fail "Failed to test //a:success_test"
Expand Down

0 comments on commit 23580aa

Please sign in to comment.