aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar ulfjack <ulfjack@google.com>2018-05-28 03:02:06 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-05-28 03:03:37 -0700
commitcdf118a607ab179807cd39d0cafdb551859d1cd1 (patch)
tree6e18d59f4dc9e675653028b710b79a761b2c202d /src/test
parent2ad044cbc0214ad1e1d7a30350e8b428dcd29bf4 (diff)
Enable --experimental_remote_spawn_cache by default
- It is now an error to specify the gRPC remote execution backend in combination with a local disk or HTTP-based cache. - It is now an error to specify both local disk and HTTP-based caches. Note that before this CL, enabling the local disk cache silently disabled remote execution - we now give an error in that case. With these combination no longer being accepted, remote execution being enabled now means that we only create a RemoteSpawnRunner, and don't provide a SpawnCache. This is not a semantic change - we never created both. In principle, it should be possible for users to combine local execution with remote caching for actions that are marked local or no-remote, and still use remote execution otherwise. However, Bazel cannot currently express this combination of execution strategies. RELNOTES: The --experimental_remote_spawn_cache flag is now enabled by default, and remote caching no longer needs --*_strategy=remote flags (it will fail if they are specified). PiperOrigin-RevId: 198280398
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/remote/remote_execution_http_test.sh26
-rwxr-xr-xsrc/test/shell/bazel/remote/remote_execution_test.sh12
2 files changed, 0 insertions, 38 deletions
diff --git a/src/test/shell/bazel/remote/remote_execution_http_test.sh b/src/test/shell/bazel/remote/remote_execution_http_test.sh
index 215ea74219..8de00d2c4f 100755
--- a/src/test/shell/bazel/remote/remote_execution_http_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_http_test.sh
@@ -78,7 +78,6 @@ EOF
bazel clean --expunge >& $TEST_log
bazel build \
- --experimental_remote_spawn_cache=true \
--remote_http_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote REST cache service"
@@ -112,7 +111,6 @@ EOF
bazel clean --expunge >& $TEST_log
bazel build \
- --experimental_remote_spawn_cache=true \
--remote_http_cache=http://bad.hostname/bad/cache \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote REST cache service"
@@ -136,15 +134,6 @@ genrule(
)
EOF
bazel build \
- --genrule_strategy=remote \
- --noremote_allow_symlink_upload \
- --remote_http_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
- //:make-link &> $TEST_log \
- && fail "should have failed" || true
- expect_log "/l is a symbolic link"
-
- bazel build \
- --experimental_remote_spawn_cache \
--noremote_allow_symlink_upload \
--remote_http_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
//:make-link &> $TEST_log \
@@ -161,15 +150,6 @@ genrule(
)
EOF
bazel build \
- --genrule_strategy=remote \
- --noremote_allow_symlink_upload \
- --remote_http_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
- //:make-link &> $TEST_log \
- && fail "should have failed" || true
- expect_log "dir/l is a symbolic link"
-
- bazel build \
- --experimental_remote_spawn_cache \
--noremote_allow_symlink_upload \
--remote_http_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
//:make-link &> $TEST_log \
@@ -224,7 +204,6 @@ function test_directory_artifact() {
bazel build \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote execution"
diff bazel-genfiles/a/qux/out.txt a/test_expected \
@@ -235,7 +214,6 @@ function test_directory_artifact_grpc_cache() {
set_directory_artifact_testfixtures
bazel build \
- --spawn_strategy=remote \
--remote_cache=localhost:${worker_port} \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote gRPC cache"
@@ -247,7 +225,6 @@ function test_directory_artifact_rest_cache() {
set_directory_artifact_testfixtures
bazel build \
- --spawn_strategy=remote \
--remote_rest_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote REST cache"
@@ -320,7 +297,6 @@ function test_directory_artifact_skylark() {
bazel build \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote execution"
diff bazel-genfiles/a/qux/out.txt a/test_expected \
@@ -331,7 +307,6 @@ function test_directory_artifact_skylark_grpc_cache() {
set_directory_artifact_skylark_testfixtures
bazel build \
- --spawn_strategy=remote \
--remote_cache=localhost:${worker_port} \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote gRPC cache"
@@ -343,7 +318,6 @@ function test_directory_artifact_skylark_rest_cache() {
set_directory_artifact_skylark_testfixtures
bazel build \
- --spawn_strategy=remote \
--remote_rest_cache=http://localhost:${hazelcast_port}/hazelcast/rest/maps \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote REST cache"
diff --git a/src/test/shell/bazel/remote/remote_execution_test.sh b/src/test/shell/bazel/remote/remote_execution_test.sh
index ecbddb6532..f56b5fb36d 100755
--- a/src/test/shell/bazel/remote/remote_execution_test.sh
+++ b/src/test/shell/bazel/remote/remote_execution_test.sh
@@ -89,7 +89,6 @@ EOF
bazel build \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote execution"
diff bazel-bin/a/test ${TEST_TMPDIR}/test_expected \
@@ -119,7 +118,6 @@ EOF
bazel test \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
|| fail "Failed to run //a:test with remote execution"
@@ -144,7 +142,6 @@ EOF
bazel clean --expunge >& $TEST_log
bazel build \
- --spawn_strategy=remote \
--remote_cache=localhost:${worker_port} \
//a:test >& $TEST_log \
|| fail "Failed to build //a:test with remote gRPC cache service"
@@ -168,7 +165,6 @@ EOF
bazel test \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
&& fail "Expected test failure" || true
@@ -194,7 +190,6 @@ EOF
int main() { std::cout << "Fail me!" << std::endl; return 1; }
EOF
bazel test \
- --spawn_strategy=remote \
--remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
@@ -219,7 +214,6 @@ EOF
int main() { std::cout << "Fail me!" << std::endl; return 1; }
EOF
bazel test \
- --experimental_remote_spawn_cache \
--remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
@@ -236,7 +230,6 @@ EOF
int main() { std::cout << "Fail me again!" << std::endl; return 1; }
EOF
bazel test \
- --experimental_remote_spawn_cache \
--remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
@@ -272,7 +265,6 @@ EOF
bazel build \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
//a:large_output >& $TEST_log \
|| fail "Failed to build //a:large_output with remote execution"
diff bazel-genfiles/a/large_blob.txt ${TEST_TMPDIR}/large_blob_expected.txt \
@@ -296,7 +288,6 @@ EOF
bazel test \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
|| fail "Failed to run //a:test with remote execution"
@@ -331,7 +322,6 @@ EOF
bazel test \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
|| fail "Failed to run //a:test with remote execution"
@@ -370,7 +360,6 @@ EOF
bazel test \
--spawn_strategy=remote \
--remote_executor=localhost:${worker_port} \
- --remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \
&& fail "Expected test failure" || true
@@ -400,7 +389,6 @@ package(default_visibility = ["//visibility:public"])
empty(name = 'test')
EOF
bazel build \
- --spawn_strategy=remote \
--remote_cache=localhost:${worker_port} \
--test_output=errors \
//a:test >& $TEST_log \