Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix javatools #8164

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .bazelci/postsubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/singlejar/..."
- "//third_party/ijar/..."
Expand All @@ -22,6 +22,9 @@ platforms:
- "//tools/python/..."
# TODO(iirina): Re-enable after #7952 was released.
- "-//src/test/shell/bazel:embedded_tools_deps_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/buildjar/..."
- "-//src/java_tools/import_deps_checker/..."
ubuntu1604:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
Expand All @@ -35,7 +38,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/singlejar/..."
- "//third_party/ijar/..."
Expand All @@ -44,6 +47,9 @@ platforms:
- "//tools/python/..."
# TODO(iirina): Re-enable after #7952 was released.
- "-//src/test/shell/bazel:embedded_tools_deps_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/buildjar/..."
- "-//src/java_tools/import_deps_checker/..."
ubuntu1804:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
Expand All @@ -57,7 +63,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/singlejar/..."
- "//third_party/ijar/..."
Expand All @@ -71,6 +77,8 @@ platforms:
- "-//src/test/shell/bazel:bazel_bootstrap_distfile_test"
# TODO(iirina): Re-enable after #7952 was released.
- "-//src/test/shell/bazel:embedded_tools_deps_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
ubuntu1804_javabase9:
platform: ubuntu1804_nojava
name: ":java: OpenJDK 9 Javabase"
Expand All @@ -89,13 +97,15 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/singlejar/..."
- "//third_party/ijar/..."
- "//tools/aquery_differ/..."
- "//tools/android/..."
- "//tools/python/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# Currently broken tests on this platform.
# These tests do not work without an installed system JDK:
# (see https://github.com/bazelbuild/bazel/issues/6214#issuecomment-424813868)
Expand Down Expand Up @@ -153,13 +163,15 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/singlejar/..."
- "//third_party/ijar/..."
- "//tools/aquery_differ/..."
- "//tools/android/..."
- "//tools/python/..."
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# Currently broken tests on this platform.
# These tests do not work without an installed system JDK:
# (see https://github.com/bazelbuild/bazel/issues/6214#issuecomment-424813868)
Expand Down
22 changes: 17 additions & 5 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/singlejar/..."
Expand All @@ -26,6 +26,9 @@ platforms:
- "-//src/test/shell/bazel:bazel_determinism_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663
- "-//src/test/shell/bazel/android:android_ndk_integration_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/buildjar/..."
- "-//src/java_tools/import_deps_checker/..."
ubuntu1604:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
Expand All @@ -39,7 +42,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/singlejar/..."
Expand All @@ -52,6 +55,9 @@ platforms:
- "-//src/test/shell/bazel:bazel_determinism_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/4663
- "-//src/test/shell/bazel/android:android_ndk_integration_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/buildjar/..."
- "-//src/java_tools/import_deps_checker/..."
ubuntu1804:
shell_commands:
- sed -i.bak -e 's/^# android_sdk_repository/android_sdk_repository/' -e 's/^#
Expand All @@ -65,7 +71,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/singlejar/..."
Expand All @@ -83,6 +89,8 @@ platforms:
- "-//src/test/shell/bazel:maven_test"
# Re-enable once bootstrap works with Java 11
- "-//src/test/shell/bazel:bazel_bootstrap_distfile_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
ubuntu1804_javabase9:
platform: ubuntu1804_nojava
name: ":java: OpenJDK 9 Javabase"
Expand All @@ -101,7 +109,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/singlejar/..."
Expand All @@ -112,6 +120,8 @@ platforms:
- "//tools/python/..."
# Disable Slow Tests
- "-//src/test/shell/bazel:bazel_determinism_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# These tests do not work without an installed system JDK:
# (see https://github.com/bazelbuild/bazel/issues/6214#issuecomment-424813868)
- "-//src/test/java/com/google/devtools/build/android/..."
Expand Down Expand Up @@ -165,7 +175,7 @@ platforms:
test_targets:
- "--"
- "//scripts/..."
- "//src/java_tools/junitrunner/javatests/..."
- "//src/java_tools/..."
- "//src/test/..."
- "//src/tools/execlog/..."
- "//src/tools/singlejar/..."
Expand All @@ -176,6 +186,8 @@ platforms:
- "//tools/python/..."
# Disable Slow Tests
- "-//src/test/shell/bazel:bazel_determinism_test"
# Re-enable once fixed: https://github.com/bazelbuild/bazel/issues/8162
- "-//src/java_tools/import_deps_checker/..."
# These tests do not work without an installed system JDK:
# (see https://github.com/bazelbuild/bazel/issues/6214#issuecomment-424813868)
- "-//src/test/java/com/google/devtools/build/android/..."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,6 @@ public void diagnosticWithoutSource() throws Exception {
source.toString(),
"--output",
output.toString(),
"--bootclasspath",
Paths.get(System.getProperty("java.home")).resolve("lib/rt.jar").toString(),
"--tempdir",
temporaryFolder.newFolder().toString(),
"--classdir",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ public void setUp() throws IOException {
optionsBuilder
.setOutput(output.toString())
.setTempDir(tempdir.toString())
.addBootClassPathEntries(
JavacBootclasspath.asPaths().stream().map(Path::toString).collect(toImmutableList()))
.setOutputDeps(outputDeps.toString())
.addAllJavacOpts(Arrays.asList("-source", "8", "-target", "8"))
.setTargetLabel("//test");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ java_test(
data = [
"//third_party/java/jdk/langtools:javac_jar",
],
jvm_flags = [
# Simulates how Bazel invokes turbine
"-Xbootclasspath/p:$(location //third_party/java/jdk/langtools:javac_jar)",
],
deps = [
":AbstractJavacTurbineCompilationTest",
"//src/java_tools/buildjar/java/com/google/devtools/build/java/turbine/javac:javac_turbine",
Expand All @@ -47,10 +43,6 @@ java_test(
name = "ProcessorClasspathTest_bootclasspath",
srcs = ["//src/java_tools/buildjar/javatests/com/google/devtools/build/java/turbine/javac:ProcessorClasspathTest.java"],
data = ["//third_party/java/jdk/langtools:javac_jar"],
jvm_flags = [
# Simulates how Bazel invokes turbine
"-Xbootclasspath/p:$(location //third_party/java/jdk/langtools:javac_jar)",
],
test_class = "com.google.devtools.build.java.turbine.javac.ProcessorClasspathTest",
deps = [
"//src/java_tools/buildjar/java/com/google/devtools/build/java/turbine/javac:javac_turbine",
Expand All @@ -72,10 +64,6 @@ java_test(
data = [
"//third_party/java/jdk/langtools:javac_jar",
],
jvm_flags = [
# Simulates how Bazel invokes turbine
"-Xbootclasspath/p:$(location //third_party/java/jdk/langtools:javac_jar)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove these flags? They may be the reason why the buildtools tests are failing on jdk8

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the build fails with them on JDK11.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I think it's ok to disable the tests for JDK8 for the time being... I'll investigate the issue on Monday. Thanks!

],
deps = [
"//src/java_tools/buildjar/java/com/google/devtools/build/java/turbine/javac:tree_pruner",
"//third_party:guava",
Expand Down