aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-11-24 04:49:10 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-11-24 04:50:45 -0800
commit263c5e07dd2860a866fd361cd29c03afaf3e019f (patch)
tree6b249a7f5f92cb0aed9caf6f2f666694e074d7cd /src/test/java/com/google/devtools/build
parent9ee4073a0e6a2f92cd325e4441fc2b74b1fda299 (diff)
Add //tools/jdk:current_java_runtime / tools/jdk:current_host_java_runtime to rules that use the $(JAVA) or the $(JAVABASE) Make variable.
This is necessary because a future Blaze version will require this for rules that use said Make variables. This incompatible change can be tested today by adding the --noexperimental_enable_jvm_configuration_make_variables command line option to Blaze. This change is part of a large-scale change ([] RELNOTES: None. PiperOrigin-RevId: 176834987
Diffstat (limited to 'src/test/java/com/google/devtools/build')
-rw-r--r--src/test/java/com/google/devtools/build/android/desugar/BUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/android/desugar/BUILD b/src/test/java/com/google/devtools/build/android/desugar/BUILD
index 309e22bf84..a079ef80c5 100644
--- a/src/test/java/com/google/devtools/build/android/desugar/BUILD
+++ b/src/test/java/com/google/devtools/build/android/desugar/BUILD
@@ -530,6 +530,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
# Make sure desugaring twice doesn't add any files
@@ -548,6 +551,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
sh_test(
@@ -565,6 +571,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
# TODO(b/37110951): Add jar content test for desugared default methods that works with coverage on
@@ -584,6 +593,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
sh_test(
@@ -601,6 +613,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
sh_test(
@@ -618,6 +633,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
# Test for b/63900665
@@ -636,6 +654,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
# Test for b/62047432
@@ -738,6 +759,9 @@ sh_test(
"@bazel_tools//tools/jdk",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
# The following genrules run the code tested here as a build tool. While that's
@@ -1556,6 +1580,9 @@ sh_test(
":capture_lambda_disassembled.txt",
],
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
)
genrule(
@@ -1566,6 +1593,9 @@ genrule(
$(JAVABASE)/bin/javap -c -p -cp $< 'com.google.devtools.build.android.desugar.testdata.CaptureLambda$$$$Lambda$$0' > $@
""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk"],
)
@@ -1592,6 +1622,9 @@ genrule(
$(JAVABASE)/bin/javap -c -p -cp $< 'com.google.devtools.build.android.desugar.testdata.MethodReferenceSuperclass$$$$Lambda$$0' > $@
""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk"],
)
@@ -1620,6 +1653,9 @@ genrule(
$(JAVABASE)/bin/javap -p -cp $< 'com.google.devtools.build.android.desugar.testdata.java8.InterfaceMethod' | grep -v 'jacoco' | grep -v 'static {}' > $@
""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk"],
)
@@ -1648,6 +1684,9 @@ genrule(
$(JAVABASE)/bin/javap -p -cp $< 'com.google.devtools.build.android.desugar.testdata.java8.Named$$AbstractName' | grep -v 'jacoco' | grep -v 'static {}' > $@
""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk"],
)
@@ -1676,6 +1715,9 @@ genrule(
$(JAVABASE)/bin/javap -p -cp $< 'com.google.devtools.build.android.desugar.testdata.java8.InterfaceMethod$$Concrete' | grep -v 'jacoco' | grep -v 'static {}' > $@
""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk"],
)
@@ -1764,6 +1806,9 @@ genrule(
$(JAVABASE)/bin/javap -p -cp $< com.google.devtools.build.android.desugar.testdata.OuterReferenceLambda > $(location baseclass_disassembled.txt)
grep lambda $(location baseclass_disassembled.txt) > $(location baseclass_lambda_signature.txt)""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = ["@bazel_tools//tools/jdk"],
)
@@ -1778,6 +1823,9 @@ genrule(
$(JAVABASE)/bin/javap -p -cp $< com.google.devtools.build.android.desugar.testdata.LambdaInOverride > $(location subclass_disassembled.txt)
grep lambda $(location subclass_disassembled.txt) > $(location subclass_lambda_signature.txt)""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = [
"@bazel_tools//tools/jdk",
],
@@ -1807,6 +1855,9 @@ genrule(
outs = ["jacoco_legacy_default_method_companion_disassembled.txt"],
cmd = """$(JAVABASE)/bin/javap -c -p -cp $< 'com/example/gavra/java8coverage/Defaults$$$$CC' > $@""",
tags = ["no_windows"],
+ # This should be current_host_java_runtime, but the last Bazel release
+ # (0.7.0) doesn't support it
+ toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
tools = [
"@bazel_tools//tools/jdk",
],