@ -51,12 +51,17 @@ FAILED_TESTS=""
export OVERRIDE_BAZEL_VERSION = " $VERSION "
export OVERRIDE_BAZEL_VERSION = " $VERSION "
# when running under bazel docker image, the workspace is read only.
# when running under bazel docker image, the workspace is read only.
export OVERRIDE_BAZEL_WRAPPER_DOWNLOAD_DIR = /tmp
export OVERRIDE_BAZEL_WRAPPER_DOWNLOAD_DIR = /tmp
bazel build -- //... " ${ EXCLUDED_TARGETS [@] } " || FAILED_TESTS = " ${ FAILED_TESTS } Build "
ACTION_ENV_FLAG = " --action_env=bazel_cache_invalidate=version_ ${ VERSION } "
tools/bazel test " ${ ACTION_ENV_FLAG } " --test_output= all //:all || FAILED_TESTS = " ${ FAILED_TESTS } ${ TEST_DIRECTORY } Build "
tools/bazel build " ${ ACTION_ENV_FLAG } " -- //... " ${ EXCLUDED_TARGETS [@] } " || FAILED_TESTS = " ${ FAILED_TESTS } Build "
for TEST_DIRECTORY in " ${ TEST_DIRECTORIES [@] } " ; do
for TEST_DIRECTORY in " ${ TEST_DIRECTORIES [@] } " ; do
pushd " test/distrib/bazel/ $TEST_DIRECTORY / "
pushd " test/distrib/bazel/ $TEST_DIRECTORY / "
bazel test --test_output= all //:all || FAILED_TESTS = " ${ FAILED_TESTS } ${ TEST_DIRECTORY } Distribtest "
tools/bazel version | grep " $VERSION " || { echo " Detected bazel version did not match expected value of $VERSION " >/dev/stderr; exit 1; }
tools/bazel test " ${ ACTION_ENV_FLAG } " --test_output= all //:all || FAILED_TESTS = " ${ FAILED_TESTS } ${ TEST_DIRECTORY } Distribtest "
popd
popd
done
done