From 66c22f46618b45b55b1b7778e53f1c33802ec041 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 18 Nov 2022 07:02:30 -0800 Subject: [PATCH] Switch the embedded JDK to version 17. This allows removing the "cached" allmodules and minimized jdk archives, since `jlink` is deterministic in newer JDK versions. Fixes https://github.com/bazelbuild/bazel/issues/14785. Closes #16541. PiperOrigin-RevId: 489464974 Change-Id: If5bb457d20cf79b70ba03b862eff302ef4d296d2 --- WORKSPACE | 72 +---------- distdir_deps.bzl | 77 ++++++++++-- src/BUILD | 115 ++---------------- src/minimize_jdk.sh | 7 +- src/test/shell/bazel/BUILD | 8 +- src/test/shell/bazel/jdeps_test.sh | 4 +- .../integration/bazel_command_log_test.sh | 1 + .../integration/py_args_escaping_test.sh | 2 +- src/test/shell/testenv.sh.tmpl | 5 - third_party/ijar/test/ijar_test.sh | 4 +- 10 files changed, 88 insertions(+), 207 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index ac05510832330e..536077c9202b8d 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,6 +1,6 @@ workspace(name = "io_bazel") -load("//tools/build_defs/repo:http.bzl", "http_archive", "http_file", "http_jar") +load("//tools/build_defs/repo:http.bzl", "http_archive", "http_jar") load("//:distdir.bzl", "dist_http_archive", "dist_http_file", "distdir_tar") load("//:distdir_deps.bzl", "DIST_DEPS") @@ -145,44 +145,16 @@ distdir_tar( ) # OpenJDK distributions used to create a version of Bazel bundled with the OpenJDK. -http_file( - name = "openjdk_linux", - downloaded_file_path = "zulu-linux.tar.gz", - sha256 = "65bfe4e0ffa74a680ee4410db46b17e30cd9397b664a92a886599fe1f3530969", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-linux_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689070.tar.gz"], -) - dist_http_file( name = "openjdk_linux_vanilla", downloaded_file_path = "zulu-linux-vanilla.tar.gz", ) -http_file( - name = "openjdk_linux_minimal", - downloaded_file_path = "zulu-linux-minimal.tar.gz", - sha256 = "91f7d52f695c681d4e21499b4319d548aadef249a6b3053e306308992e1e29ae", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689068.tar.gz"], -) - -http_file( - name = "openjdk_linux_aarch64", - downloaded_file_path = "zulu-linux-aarch64.tar.gz", - sha256 = "6b245793087300db3ee82ab0d165614f193a73a60f2f011e347756c1e6ca5bac", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz"], -) - dist_http_file( name = "openjdk_linux_aarch64_vanilla", downloaded_file_path = "zulu-linux-aarch64-vanilla.tar.gz", ) -http_file( - name = "openjdk_linux_aarch64_minimal", - downloaded_file_path = "zulu-linux-aarch64-minimal.tar.gz", - sha256 = "06f6520a877704c77614bcfc4f846cc7cbcbf5eaad149bf7f19f4f16e285c9de", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz"], -) - dist_http_file( name = "openjdk_linux_ppc64le_vanilla", downloaded_file_path = "adoptopenjdk-ppc64le-vanilla.tar.gz", @@ -193,51 +165,16 @@ dist_http_file( downloaded_file_path = "adoptopenjdk-s390x-vanilla.tar.gz", ) -http_file( - name = "openjdk_macos_x86_64", - downloaded_file_path = "zulu-macos.tar.gz", - sha256 = "8e283cfd23c7555be8e17295ed76eb8f00324c88ab904b8de37bbe08f90e569b", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689066.tar.gz"], -) - dist_http_file( name = "openjdk_macos_x86_64_vanilla", downloaded_file_path = "zulu-macos-vanilla.tar.gz", ) -http_file( - name = "openjdk_macos_x86_64_minimal", - downloaded_file_path = "zulu-macos-minimal.tar.gz", - sha256 = "1bacb1c07035d4066d79f0b65b4ea0ebd1954f3662bdfe3618da382ac8fd23a6", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689063.tar.gz"], -) - -http_file( - name = "openjdk_macos_aarch64", - downloaded_file_path = "zulu-macos-aarch64.tar.gz", - sha256 = "a900ef793cb34b03ac5d93ea2f67291b6842e99d500934e19393a8d8f9bfa6ff", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.45.27-ca-jdk11.0.10/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64-allmodules-1611665569.tar.gz"], -) - dist_http_file( name = "openjdk_macos_aarch64_vanilla", downloaded_file_path = "zulu-macos-aarch64-vanilla.tar.gz", ) -http_file( - name = "openjdk_macos_aarch64_minimal", - downloaded_file_path = "zulu-macos-aarch64-minimal.tar.gz", - sha256 = "f4f606926e6deeaa8b8397e299313d9df87642fe464b0ccf1ed0432aeb00640b", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.45.27-ca-jdk11.0.10/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64-minimal-1611665562.tar.gz"], -) - -http_file( - name = "openjdk_win", - downloaded_file_path = "zulu-win.zip", - sha256 = "8e1604b3a27dcf639bc6d1a73103f1211848139e4cceb081d0a74a99e1e6f995", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip"], -) - dist_http_file( name = "openjdk_win_vanilla", downloaded_file_path = "zulu-win-vanilla.zip", @@ -248,13 +185,6 @@ dist_http_file( downloaded_file_path = "zulu-win-arm64.zip", ) -http_file( - name = "openjdk_win_minimal", - downloaded_file_path = "zulu-win-minimal.zip", - sha256 = "b90a713c9c2d9ea23cad44d2c2dfcc9af22faba9bde55dedc1c3bb9f556ac1ae", - urls = ["https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip"], -) - dist_http_archive( name = "bazelci_rules", patch_cmds = EXPORT_WORKSPACE_IN_BUILD_FILE, diff --git a/distdir_deps.bzl b/distdir_deps.bzl index 26cdfd0c7f1b43..e975d43492ec60 100644 --- a/distdir_deps.bzl +++ b/distdir_deps.bzl @@ -395,7 +395,6 @@ DIST_DEPS = { "aliases": [ "remotejdk11_linux_for_testing", "openjdk11_linux_archive", - "openjdk_linux_vanilla", ], "archive": "zulu11.56.19-ca-jdk11.0.15-linux_x64.tar.gz", "sha256": "e064b61d93304012351242bf0823c6a2e41d9e28add7ea7f05378b7243d34247", @@ -409,7 +408,6 @@ DIST_DEPS = { "remotejdk11_linux_aarch64": { "aliases": [ "remotejdk11_linux_aarch64_for_testing", - "openjdk_linux_aarch64_vanilla", ], "archive": "zulu11.56.19-ca-jdk11.0.15-linux_aarch64.tar.gz", "sha256": "fc7c41a0005180d4ca471c90d01e049469e0614cf774566d4cf383caa29d1a97", @@ -423,7 +421,6 @@ DIST_DEPS = { "remotejdk11_linux_ppc64le": { "aliases": [ "remotejdk11_linux_ppc64le_for_testing", - "openjdk_linux_ppc64le_vanilla", ], "sha256": "a8fba686f6eb8ae1d1a9566821dbd5a85a1108b96ad857fdbac5c1e4649fc56f", "strip_prefix": "jdk-11.0.15+10", @@ -436,7 +433,6 @@ DIST_DEPS = { "remotejdk11_linux_s390x": { "aliases": [ "remotejdk11_linux_s390x_for_testing", - "openjdk_linux_s390x_vanilla", ], "sha256": "a58fc0361966af0a5d5a31a2d8a208e3c9bb0f54f345596fd80b99ea9a39788b", "strip_prefix": "jdk-11.0.15+10", @@ -449,7 +445,6 @@ DIST_DEPS = { "remotejdk11_macos": { "aliases": [ "remotejdk11_macos_for_testing", - "openjdk_macos_x86_64_vanilla", "openjdk11_darwin_archive", ], "archive": "zulu11.56.19-ca-jdk11.0.15-macosx_x64.tar.gz", @@ -463,7 +458,6 @@ DIST_DEPS = { }, "remotejdk11_macos_aarch64": { "aliases": [ - "openjdk_macos_aarch64_vanilla", "remotejdk11_macos_aarch64_for_testing", "openjdk11_darwin_aarch64_archive", ], @@ -480,7 +474,6 @@ DIST_DEPS = { "aliases": [ "remotejdk11_win_for_testing", "openjdk11_windows_archive", - "openjdk_win_vanilla", ], "archive": "zulu11.56.19-ca-jdk11.0.15-win_x64.zip", "sha256": "a106c77389a63b6bd963a087d5f01171bd32aa3ee7377ecef87531390dcb9050", @@ -504,7 +497,10 @@ DIST_DEPS = { "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip", "https://cdn.azul.com/zulu/bin/zulu17.30.15-ca-jdk17.0.1-win_aarch64.zip", ], - "used_in": ["test_WORKSPACE_files"], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], }, "remotejdk11_win_arm64": { "aliases": [ @@ -523,19 +519,25 @@ DIST_DEPS = { "aliases": [ "remotejdk17_linux_for_testing", "openjdk17_linux_archive", + "openjdk_linux_vanilla", ], + "archive": "zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz", "sha256": "73d5c4bae20325ca41b606f7eae64669db3aac638c5b3ead4a975055846ad6de", "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-linux_x64", "urls": [ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz", "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_x64.tar.gz", ], - "used_in": [], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], }, "remotejdk17_linux_aarch64": { "aliases": [ "remotejdk17_linux_aarch64_for_testing", "openjdk17_linux_aarch64_archive", + "openjdk_linux_aarch64_vanilla", ], "archive": "zulu17.32.13-ca-jdk17.0.2-linux_aarch64.tar.gz", "sha256": "2b8066bbdbc5cff422bb6b6db1b8f8d362b576340cce8492f1255502af632b06", @@ -544,46 +546,95 @@ DIST_DEPS = { "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_aarch64.tar.gz", "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-linux_aarch64.tar.gz", ], - "used_in": ["test_WORKSPACE_files"], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], + }, + "remotejdk17_linux_s390x": { + "aliases": [ + "remotejdk17_linux_s390x_for_testing", + "openjdk_linux_s390x_vanilla", + ], + "archive": "OpenJDK17U-jdk_s390x_linux_hotspot_17.0.4.1_1.tar.gz", + "sha256": "fdc82f4b06c880762503b0cb40e25f46cf8190d06011b3b768f4091d3334ef7f", + "strip_prefix": "jdk-17.0.4.1+1", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.4.1_1.tar.gz", + "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.4.1_1.tar.gz", + ], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], + }, + "remotejdk17_linux_ppc64le": { + "aliases": [ + "remotejdk17_linux_ppc64le_for_testing", + "openjdk_linux_ppc64le_vanilla", + ], + "archive": "OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.4.1_1.tar.gz", + "sha256": "cbedd0a1428b3058d156e99e8e9bc8769e0d633736d6776a4c4d9136648f2fd1", + "strip_prefix": "jdk-17.0.4.1+1", + "urls": [ + "https://mirror.bazel.build/github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.4.1_1.tar.gz", + "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.4.1%2B1/OpenJDK17U-jdk_ppc64le_linux_hotspot_17.0.4.1_1.tar.gz", + ], + "used_in": ["additional_distfiles"], }, "remotejdk17_macos": { "aliases": [ "remotejdk17_macos_for_testing", "openjdk17_darwin_archive", + "openjdk_macos_x86_64_vanilla", ], + "archive": "zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz", "sha256": "89d04b2d99b05dcb25114178e65f6a1c5ca742e125cab0a63d87e7e42f3fcb80", "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_x64", "urls": [ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz", "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_x64.tar.gz", ], - "used_in": [], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], }, "remotejdk17_macos_aarch64": { "aliases": [ "remotejdk17_macos_aarch64_for_testing", "openjdk17_darwin_aarch64_archive", + "openjdk_macos_aarch64_vanilla", ], + "archive": "zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz", "sha256": "54247dde248ffbcd3c048675504b1c503b81daf2dc0d64a79e353c48d383c977", "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-macosx_aarch64", "urls": [ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz", "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-macosx_aarch64.tar.gz", ], - "used_in": [], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], }, "remotejdk17_win": { "aliases": [ "remotejdk17_win_for_testing", "openjdk17_windows_archive", + "openjdk_win_vanilla", ], + "archive": "zulu17.32.13-ca-jdk17.0.2-win_x64.zip", "sha256": "e965aa0ea7a0661a3446cf8f10ee00684b851f883b803315289f26b4aa907fdb", "strip_prefix": "zulu17.32.13-ca-jdk17.0.2-win_x64", "urls": [ "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip", "https://cdn.azul.com/zulu/bin/zulu17.32.13-ca-jdk17.0.2-win_x64.zip", ], - "used_in": [], + "used_in": [ + "additional_distfiles", + "test_WORKSPACE_files", + ], }, "remotejdk18_linux_aarch64": { "aliases": [ diff --git a/src/BUILD b/src/BUILD index 4bf0179a24d213..d06feaba17fa77 100644 --- a/src/BUILD +++ b/src/BUILD @@ -42,7 +42,6 @@ md5_cmd = "set -e -o pipefail && %s $(SRCS) | %s | %s > $@" ) for suffix, embedded_tools_target in { "_jdk_allmodules": [":embedded_tools_jdk_allmodules"], "_jdk_minimal": [":embedded_tools_jdk_minimal"], - "_dev_jdk": [":embedded_tools_dev_jdk"], "_nojdk": [":embedded_tools_nojdk"], "_notools": [], }.items()] @@ -125,9 +124,8 @@ JAVA_TOOLS = [ "//src/test:__subpackages__", # For integration tests ], ) for suffix, jdk in { - "_jdk_allmodules": [":embedded_jdk_allmodules_cached"], - "_jdk_minimal": [":embedded_jdk_minimal_cached"], - "_dev_jdk": [":embedded_jdk_minimal"], + "_jdk_allmodules": [":embedded_jdk_allmodules"], + "_jdk_minimal": [":embedded_jdk_minimal"], "_nojdk": [], }.items()] @@ -141,56 +139,6 @@ rule_size_test( margin = 5, # percentage ) -filegroup( - name = "embedded_jdk_allmodules_cached", - srcs = select({ - "//src/conditions:darwin_x86_64": [ - "@openjdk_macos_x86_64//file", - ], - "//src/conditions:darwin_arm64": [ - "@openjdk_macos_aarch64//file", - ], - "//src/conditions:windows_arm64": [ - "@openjdk_win_arm64_vanilla//file", # TODO(#14339): replace with openjdk_win_arm64 when packages are uploaded to bazel mirror server - ], - "//src/conditions:windows_x86_64": [ - "@openjdk_win//file", - ], - "//src/conditions:linux_aarch64": [ - "@openjdk_linux_aarch64//file", - ], - "//conditions:default": [ - "@openjdk_linux//file", - ], - }), - visibility = ["//src/test/shell/bazel:__pkg__"], -) - -filegroup( - name = "embedded_jdk_minimal_cached", - srcs = select({ - "//src/conditions:darwin_x86_64": [ - "@openjdk_macos_x86_64_minimal//file", - ], - "//src/conditions:darwin_arm64": [ - "@openjdk_macos_aarch64_minimal//file", - ], - "//src/conditions:windows_arm64": [ - "@openjdk_win_arm64_vanilla//file", # TODO(#14339): replace with openjdk_win_arm64 when packages are uploaded to bazel mirror server - ], - "//src/conditions:windows_x86_64": [ - "@openjdk_win_minimal//file", - ], - "//src/conditions:linux_aarch64": [ - "@openjdk_linux_aarch64_minimal//file", - ], - "//conditions:default": [ - "@openjdk_linux_minimal//file", - ], - }), - visibility = ["//src/test/shell/bazel:__pkg__"], -) - filegroup( name = "embedded_jdk_vanilla", srcs = select({ @@ -224,60 +172,29 @@ sh_binary( srcs = ["minimize_jdk.sh"], ) -filegroup( +genrule( name = "embedded_jdk_minimal", - srcs = select({ - "//src/conditions:windows": [ - ":embedded_jdk_minimal.zip", - ], - "//conditions:default": [ - ":embedded_jdk_minimal.tar.gz", - ], - }), -) - -filegroup( - name = "embedded_jdk_allmodules", - srcs = select({ - "//src/conditions:windows": [ - ":embedded_jdk_allmodules.zip", - ], - "//conditions:default": [ - ":embedded_jdk_allmodules.tar.gz", - ], - }), - visibility = ["//src/test/shell/bazel:__pkg__"], -) - -[genrule( - name = "embedded_jdk_minimal" + suffix, srcs = [ ":embedded_jdk_vanilla", ":minimize_jdk.sh", ":jdeps_modules.golden", ], - outs = ["minimal_jdk" + suffix], + outs = ["minimal_jdk.zip"], cmd = "$(location :minimize_jdk.sh) $(location :embedded_jdk_vanilla) $(location :jdeps_modules.golden) $(OUTS)", visibility = ["//src/test/shell/bazel:__pkg__"], -) for suffix in [ - ".zip", - ".tar.gz", -]] +) -[genrule( - name = "embedded_jdk_allmodules" + suffix, +genrule( + name = "embedded_jdk_allmodules", srcs = [ ":embedded_jdk_vanilla", ":minimize_jdk.sh", ":jdeps_modules.golden", ], - outs = ["allmodules_jdk" + suffix], + outs = ["allmodules_jdk.zip"], cmd = "$(location :minimize_jdk.sh) --allmodules $(location :embedded_jdk_vanilla) $(location :jdeps_modules.golden) $(OUTS)", visibility = ["//src/test/shell/bazel:__pkg__"], -) for suffix in [ - ".zip", - ".tar.gz", -]] +) [srcsfile( name = "embedded_tools" + suffix + "_params", @@ -286,7 +203,6 @@ filegroup( ) for suffix in [ "_jdk_allmodules", "_jdk_minimal", - "_dev_jdk", "_nojdk", ]] @@ -302,7 +218,6 @@ filegroup( ) for suffix in [ "_jdk_allmodules", "_jdk_minimal", - "_dev_jdk", "_nojdk", ]] @@ -339,7 +254,6 @@ filegroup( ) for suffix, embed in [ ("_jdk_allmodules", True), ("_jdk_minimal", True), - ("_dev_jdk", True), ("_notools", False), ("_nojdk", True), ]] @@ -388,7 +302,6 @@ genrule( ("", "_jdk_minimal"), ("_jdk_allmodules", "_jdk_allmodules"), ("_jdk_minimal", "_jdk_minimal"), - ("_dev_jdk", "_dev_jdk"), ("_notools", "_notools"), ("_nojdk", "_nojdk"), ]] @@ -649,16 +562,6 @@ filegroup( "@android_tools_for_testing//:WORKSPACE", "@bazel_skylib//:WORKSPACE", "@com_google_protobuf//:WORKSPACE", - "@openjdk11_darwin_aarch64_archive//:WORKSPACE", - "@openjdk11_darwin_archive//:WORKSPACE", - "@openjdk11_linux_archive//:WORKSPACE", - "@openjdk11_windows_archive//:WORKSPACE", - "@openjdk11_windows_arm64_archive//:WORKSPACE", - "@openjdk_linux_aarch64_minimal//file", - "@openjdk_linux_minimal//file", - "@openjdk_macos_aarch64_minimal//file", - "@openjdk_macos_x86_64_minimal//file", - "@openjdk_win_minimal//file", "@remote_coverage_tools//:WORKSPACE", "@remote_java_tools_darwin_for_testing//:WORKSPACE", "@remote_java_tools_for_testing//:WORKSPACE", diff --git a/src/minimize_jdk.sh b/src/minimize_jdk.sh index 1f897528bd021a..f7dc8a7585be06 100755 --- a/src/minimize_jdk.sh +++ b/src/minimize_jdk.sh @@ -58,7 +58,7 @@ if [[ "$UNAME" =~ msys_nt* ]]; then reduced/ # These are necessary for --host_jvm_debug to work. cp bin/dt_socket.dll bin/jdwp.dll reduced/bin - zip -r -9 ../reduced.zip reduced/ + zip -q -X -r ../reduced.zip reduced/ cd ../.. mv "tmp.$$/reduced.zip" "$out" rm -rf "tmp.$$" @@ -79,7 +79,8 @@ else else cp lib/libdt_socket.so lib/libjdwp.so reduced/lib fi - GZIP=-9 tar -zcf ../reduced.tgz reduced + find reduced -exec touch -ht 198001010000 {} + + zip -q -X -r ../reduced.zip reduced/ cd .. - mv reduced.tgz "$out" + mv reduced.zip "$out" fi diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD index ee97c61db6d2d8..21fbf380e11e73 100644 --- a/src/test/shell/bazel/BUILD +++ b/src/test/shell/bazel/BUILD @@ -1063,12 +1063,12 @@ sh_test( srcs = ["bazel_bootstrap_distfile_test.sh"], args = [ "$(location //:bazel-distfile)", - "$(location //src:embedded_jdk_allmodules_cached)", + "$(location //src:embedded_jdk_allmodules)", ], data = [ ":test-deps", "//:bazel-distfile", - "//src:embedded_jdk_allmodules_cached", + "//src:embedded_jdk_allmodules", "@bazel_tools//tools/bash/runfiles", ], exec_compatible_with = ["//:highcpu_machine"], @@ -1081,12 +1081,12 @@ sh_test( srcs = ["bazel_bootstrap_distfile_test.sh"], args = [ "$(location //:bazel-distfile-tar)", - "$(location //src:embedded_jdk_allmodules_cached)", + "$(location //src:embedded_jdk_allmodules)", ], data = [ ":test-deps", "//:bazel-distfile-tar", - "//src:embedded_jdk_allmodules_cached", + "//src:embedded_jdk_allmodules", "@bazel_tools//tools/bash/runfiles", ], exec_compatible_with = ["//:highcpu_machine"], diff --git a/src/test/shell/bazel/jdeps_test.sh b/src/test/shell/bazel/jdeps_test.sh index 690c371d0c3f54..98513409df9929 100755 --- a/src/test/shell/bazel/jdeps_test.sh +++ b/src/test/shell/bazel/jdeps_test.sh @@ -59,8 +59,8 @@ function test_jdeps() { else platform="linux" fi - cp $(rlocation io_bazel/src/allmodules_jdk.tar.gz) . - tar xf allmodules_jdk.tar.gz || fail "Failed to extract JDK." + cp $(rlocation io_bazel/src/allmodules_jdk.zip) . + unzip allmodules_jdk.zip || fail "Failed to extract JDK." denylist=$(rlocation io_bazel/src/test/shell/bazel/jdeps_class_denylist.txt) deploy_jar=$(rlocation io_bazel/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar) cd ../bazeljar diff --git a/src/test/shell/integration/bazel_command_log_test.sh b/src/test/shell/integration/bazel_command_log_test.sh index 5b97c0e03a5978..9e06eac396737b 100755 --- a/src/test/shell/integration/bazel_command_log_test.sh +++ b/src/test/shell/integration/bazel_command_log_test.sh @@ -45,6 +45,7 @@ function strip_lines_from_bazel_cc() { -e '/^WARNING: Waiting for server process to terminate (waited 5 seconds, waiting at most 60)$/d' \ -e '/^WARNING: The startup option --host_javabase is deprecated; prefer --server_javabase.$/d' \ -e '/^WARNING: The home directory is not defined, no home_rc will be looked for.$/d' \ + -e '/Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release/d' \ $TEST_log) echo "$clean_log" > $TEST_log diff --git a/src/test/shell/integration/py_args_escaping_test.sh b/src/test/shell/integration/py_args_escaping_test.sh index e209c12da41b37..d96432417d819d 100755 --- a/src/test/shell/integration/py_args_escaping_test.sh +++ b/src/test/shell/integration/py_args_escaping_test.sh @@ -232,7 +232,7 @@ function test_args_escaping() { create_build_file_with_many_args "$ws" ( cd "$ws" - bazel --batch run --verbose_failures :x &>"$TEST_log" \ + bazel run --verbose_failures :x &>"$TEST_log" \ || fail "expected success" ) assert_good_output_of_the_program_with_many_args diff --git a/src/test/shell/testenv.sh.tmpl b/src/test/shell/testenv.sh.tmpl index fb8d963d6f449a..b72cb969f1a90e 100755 --- a/src/test/shell/testenv.sh.tmpl +++ b/src/test/shell/testenv.sh.tmpl @@ -291,11 +291,6 @@ EOF "openjdk18_linux_archive" "openjdk18_windows_archive" "openjdk18_windows_arm64_archive" - "openjdk_linux_aarch64_minimal" - "openjdk_linux_minimal" - "openjdk_macos_x86_64_minimal" - "openjdk_macos_aarch64_minimal" - "openjdk_win_minimal" "remote_coverage_tools" "remote_java_tools_for_testing" "remote_java_tools_darwin_for_testing" diff --git a/third_party/ijar/test/ijar_test.sh b/third_party/ijar/test/ijar_test.sh index 2c436cf170485d..905d0382642441 100755 --- a/third_party/ijar/test/ijar_test.sh +++ b/third_party/ijar/test/ijar_test.sh @@ -106,8 +106,8 @@ function check_consistent_file_contents() { local actual="$(cat $1 | ${MD5SUM} | awk '{ print $1; }')" local filename="$(echo $1 | ${MD5SUM} | awk '{ print $1; }')" local expected="$actual" - if (grep -q "^${filename} " <<<"${expected_output}"); then - grep -q "^${filename} ${actual}$" <<<"${expected_output}" || { + if (echo "${expected_output}" | grep -q "^${filename} "); then + echo "${expected_output}" | grep -q "^${filename} ${actual}$" || { ls -l "$1" fail "output file contents differ" }