Skip to content

Commit

Permalink
Fix tests on linux in upload_all_java_tools.sh
Browse files Browse the repository at this point in the history
Tempoarily workaround #20753 to unblock bazelbuild/java_tools#87

Setting `--sandbox_tmpfs_path=/tmp` for linux matches [the current behavior of bazelci.py](https://github.com/bazelbuild/continuous-integration/blob/7a8d90d15520b81e0f330a85772c5416a04d0061/buildkite/bazelci.py#L1976)

PiperOrigin-RevId: 604341263
Change-Id: I37fe324afe4328d861b06fc64a03e82cc55de38f
  • Loading branch information
hvadehra authored and copybara-github committed Feb 5, 2024
1 parent c2615d0 commit 3f63602
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/upload_all_java_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,18 @@ if [[ "$platform" == "windows" ]]; then
prebuilt_zip_path="$(cygpath -m "${prebuilt_zip_path}")"
fi

# Temporary workaround for https://github.com/bazelbuild/bazel/issues/20753
TEST_FLAGS=""
if [[ "$platform" == "linux" ]]; then
TEST_FLAGS="--sandbox_tmpfs_path=/tmp"
fi

# Skip for now, as the test is broken on Windows.
# See https://github.com/bazelbuild/bazel/issues/12244 for details
if [[ "$platform" != "windows" ]]; then
JAVA_VERSIONS=`cat src/test/shell/bazel/BUILD | grep '^JAVA_VERSIONS = ' | sed -e 's/JAVA_VERSIONS = //' | sed -e 's/["(),]//g'`
for java_version in $JAVA_VERSIONS; do
bazel test --verbose_failures --test_output=all --nocache_test_results \
bazel test $TEST_FLAGS --verbose_failures --test_output=all --nocache_test_results \
//src/test/shell/bazel:bazel_java_test_local_java_tools_jdk${java_version} \
--define=LOCAL_JAVA_TOOLS_ZIP_PATH="${zip_path}" \
--define=LOCAL_JAVA_TOOLS_PREBUILT_ZIP_PATH="${prebuilt_zip_path}"
Expand Down

0 comments on commit 3f63602

Please sign in to comment.