From 5392b4e092d79c38f86f9b98a070a427efa18820 Mon Sep 17 00:00:00 2001 From: iirina Date: Mon, 6 May 2019 09:41:12 +0200 Subject: [PATCH] Progress --- src/test/shell/bazel/BUILD | 192 +++++++++++++++++++++++++++++++++++ src/upload_all_java_tools.sh | 10 +- src/upload_java_tools.sh | 3 +- 3 files changed, 197 insertions(+), 8 deletions(-) diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD index 331151d8ec19b5..a78de300e6ea4e 100644 --- a/src/test/shell/bazel/BUILD +++ b/src/test/shell/bazel/BUILD @@ -980,3 +980,195 @@ sh_test( data = [":test-deps"], tags = ["no_windows"], ) +sh_test( + name = "bazel_java_test_src/java_tools_java9.zip", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_gDD4H/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_src/java_tools_dist_javac9.zip", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_6n6J7/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_src/java_tools_java10.zip", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_G8yF6/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_src/java_tools_dist_javac10.zip", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_w3qTx/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac9_5b7da1183155bfd86aafb199d579bf2e137d1704_1556806447", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_1p5OB/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac9_5b7da1183155bfd86aafb199d579bf2e137d1704_1556806749", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_2haef/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac10_5b7da1183155bfd86aafb199d579bf2e137d1704_1556806799", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_kTVuo/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac10_5b7da1183155bfd86aafb199d579bf2e137d1704_1556807073", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_LUv1l/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac9_5b7da1183155bfd86aafb199d579bf2e137d1704_1556807693", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_WoRGI/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac9_5b7da1183155bfd86aafb199d579bf2e137d1704_1556807916", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_LS3vq/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac10_5b7da1183155bfd86aafb199d579bf2e137d1704_1556807968", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_VHlGx/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) +sh_test( + name = "bazel_java_test_javac10_5b7da1183155bfd86aafb199d579bf2e137d1704_1556808252", + size = "large", + timeout = "eternal", + srcs = ["bazel_java_test.sh"], + args = [ + "@java_tools//:toolchain", + "file:///tmp/tmp_bazel_zip_files_Na2DH/archive.zip", + ], + data = [":test-deps"], + tags = [ + # TODO(laszlocsomor): make this run on Windows. Currently fails because + # the java_common provider doesn't work on Windows. + "no_windows", + ], +) diff --git a/src/upload_all_java_tools.sh b/src/upload_all_java_tools.sh index b560e08f2b2287..4355738c946a83 100755 --- a/src/upload_all_java_tools.sh +++ b/src/upload_all_java_tools.sh @@ -16,12 +16,6 @@ # A script to upload a given java_tools zip on GCS. Used by the java_tools_binaries # Buildkite pipeline. It is not recommended to run this script manually. -# -# Mandatory flags: -# --java_tools_zip The workspace-relative path of a java_tools zip. -# --gcs_java_tools_dir The directory under bazel_java_tools on GCS where the zip is uploaded. -# --java_version The version of the javac the given zip embeds. -# --platform The name of the platform where the zip was built. # Script used by the "java_tools binaries" Buildkite pipeline to build the java tools archives # and upload them on GCS. @@ -35,11 +29,13 @@ commit_hash=$(git rev-parse HEAD) timestamp=$(date +%s) bazel_version=$(bazel info release | cut -d' ' -f2) +bazel_repo="${PWD}" # Passing the same commit_hash and timestamp to all targets to mark all the artifacts # uploaded on GCS with the same identifier. for java_version in 9 10; do for target in src:upload_java_tools_java${java_version} src:upload_java_tools_dist_java${java_version}; do - bazel run ${target} -- --commit_hash ${commit_hash} --timestamp ${timestamp} --bazel_version ${bazel_version} + bazel run ${target} -- --commit_hash ${commit_hash} --timestamp ${timestamp} --bazel_version ${bazel_version} \ + --bazel_repo ${bazel_repo} done done diff --git a/src/upload_java_tools.sh b/src/upload_java_tools.sh index 2c56a93978596f..1d55cbd58a9008 100755 --- a/src/upload_java_tools.sh +++ b/src/upload_java_tools.sh @@ -99,7 +99,8 @@ zip -rv "${tmp_zip}" "${readme_file}" #git checkout "$commit_hash" cd "$bazel_repo" -test_name="bazel_java_test_${java_version}_${commit_hash}" +test_name="bazel_java_test_javac${java_version}_${commit_hash}_$(date +%s)" +zipinfo -1 ${tmp_zip} cat >>src/test/shell/bazel/BUILD <