Skip to content

Commit

Permalink
Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
iirina committed May 6, 2019
1 parent 337cbd3 commit 5392b4e
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 8 deletions.
192 changes: 192 additions & 0 deletions src/test/shell/bazel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
)
10 changes: 3 additions & 7 deletions src/upload_all_java_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
3 changes: 2 additions & 1 deletion src/upload_java_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
sh_test(
name = "${test_name}",
Expand Down

0 comments on commit 5392b4e

Please sign in to comment.