aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar Philipp Wollermann <philwo@google.com>2018-08-02 07:09:41 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-02 07:11:03 -0700
commitf32aa9a7de90a268a468c60500c8bb178fd3ce9f (patch)
tree366a1806cab1eb6c2ae08595ef9a7e0722021265 /src/test
parentd4d3d506f4cf6cfaafaeeb717d681ff7784e2384 (diff)
Docker sandbox: Pass client environment to "docker" when calling it.
Otherwise Docker will not be able to read the configuration of the current user and might fail to download containers from registries that require authentication. Closes #5721. PiperOrigin-RevId: 207094268
Diffstat (limited to 'src/test')
-rwxr-xr-xsrc/test/shell/bazel/bazel_docker_sandboxing_test.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/shell/bazel/bazel_docker_sandboxing_test.sh b/src/test/shell/bazel/bazel_docker_sandboxing_test.sh
index cec98195f3..f03cd10883 100755
--- a/src/test/shell/bazel/bazel_docker_sandboxing_test.sh
+++ b/src/test/shell/bazel/bazel_docker_sandboxing_test.sh
@@ -23,6 +23,10 @@ source $(rlocation io_bazel/src/test/shell/integration_test_setup.sh) \
|| { echo "integration_test_setup.sh not found!" >&2; exit 1; }
# Test that Bazel can be build itself with Docker sandboxing.
+#
+# This test has to be run with "bazel test --action_env=PATH --action_env=HOME", because the inner
+# Bazel needs to be able to pass $HOME and $PATH to "docker" so that it can download the container
+# from gcr.io.
function test_build_bazel_using_docker() {
unzip -qo "${DISTFILE}" &> $TEST_log || fail "Could not unzip Bazel's distfile"