Skip to content

Commit

Permalink
Read java versions for uploading java_tools from BUILD file
Browse files Browse the repository at this point in the history
This avoids having to keep the version list in sync manually.
Currently, the script fails since there are not test targets matching versions 15,16 after #14573

PiperOrigin-RevId: 440855181
  • Loading branch information
hvadehra authored and copybara-github committed Apr 11, 2022
1 parent 06898f1 commit b02458e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/upload_all_java_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ 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
for java_version in 11 15 16 17; do
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 \
//src/test/shell/bazel:bazel_java_test_local_java_tools_jdk${java_version} \
--define=LOCAL_JAVA_TOOLS_ZIP_URL="${file_url}" \
Expand Down

0 comments on commit b02458e

Please sign in to comment.