| commit | 3f636025a5a6df929ad9d744fffb08c1d1ec408c | [log] [tgz] |
|---|---|---|
| author | Googler <hvd@google.com> | Mon Feb 05 09:25:22 2024 -0800 |
| committer | Copybara-Service <copybara-worker@google.com> | Mon Feb 05 09:26:44 2024 -0800 |
| tree | 0e33b932740ca8615faae3edbe8b6b21162b3ac7 | |
| parent | c2615d0695685b98e66cbad1b79e425ec08dec75 [diff] [blame] |
Fix tests on linux in `upload_all_java_tools.sh` Tempoarily workaround https://github.com/bazelbuild/bazel/issues/20753 to unblock https://github.com/bazelbuild/java_tools/issues/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
diff --git a/src/upload_all_java_tools.sh b/src/upload_all_java_tools.sh index 63b4ca1..2bf9bc6 100755 --- a/src/upload_all_java_tools.sh +++ b/src/upload_all_java_tools.sh
@@ -72,12 +72,18 @@ 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}"