aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/test/shell/bazel/BUILD14
-rw-r--r--src/test/shell/bazel/android/BUILD2
-rwxr-xr-xsrc/test/shell/bazel/local_repository_test.sh76
-rwxr-xr-xsrc/test/shell/bazel/local_repository_test_jdk8.sh101
-rw-r--r--src/test/shell/integration/BUILD3
-rw-r--r--tools/jdk/BUILD17
6 files changed, 77 insertions, 136 deletions
diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index 9034672007..0d977f2aa5 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -189,7 +189,6 @@ sh_test(
srcs = ["bazel_coverage_test.sh"],
data = [":test-deps"],
tags = [
- "jdk8", # TODO(elenairina): Re-enable for JDK7 once https://github.com/bazelbuild/bazel/issues/2890 is fixed.
"local",
"no_windows",
],
@@ -321,17 +320,6 @@ sh_test(
)
sh_test(
- name = "local_repository_test_jdk8",
- size = "medium",
- srcs = ["local_repository_test_jdk8.sh"],
- data = [":test-deps"],
- tags = [
- "jdk8",
- "no_windows",
- ],
-)
-
-sh_test(
name = "cross_repository_test",
size = "large",
srcs = ["cross_repository_test.sh"],
@@ -566,7 +554,6 @@ sh_test(
"//:bazel-distfile",
"//src:embedded_jdk",
],
- tags = ["jdk8"],
)
sh_test(
@@ -579,7 +566,6 @@ sh_test(
"//:bazel-distfile",
],
tags = [
- "jdk8",
"no_windows",
"slow",
],
diff --git a/src/test/shell/bazel/android/BUILD b/src/test/shell/bazel/android/BUILD
index 36ec70888d..da4d336b31 100644
--- a/src/test/shell/bazel/android/BUILD
+++ b/src/test/shell/bazel/android/BUILD
@@ -102,8 +102,6 @@ sh_test(
"//external:android_sdk_for_testing",
"//src/test/shell/bazel:test-deps",
],
- # This test builds an android_binary with Java 8 code.
- tags = ["jdk8"],
)
sh_test(
diff --git a/src/test/shell/bazel/local_repository_test.sh b/src/test/shell/bazel/local_repository_test.sh
index a57940ef4c..2e6b0231ec 100755
--- a/src/test/shell/bazel/local_repository_test.sh
+++ b/src/test/shell/bazel/local_repository_test.sh
@@ -1224,4 +1224,80 @@ EOF
expect_log "is not a directory"
}
+# Creates an indirect dependency on X from A and make sure the error message
+# refers to the correct label, both in an external repository and not.
+function test_indirect_dep_message() {
+ local external_dir=$TEST_TMPDIR/ext-dir
+ mkdir -p a b $external_dir/x
+ cat > a/A.java <<EOF
+package a;
+
+import x.X;
+
+public class A {
+ public static void main(String args[]) {
+ X.print();
+ }
+}
+EOF
+ cat > a/BUILD <<EOF
+java_binary(
+ name = "a",
+ main_class = "a.A",
+ srcs = ["A.java"],
+ deps = ["//b"],
+)
+EOF
+
+
+ cat > b/B.java <<EOF
+package b;
+
+public class B {
+ public static void print() {
+ System.out.println("B");
+ }
+}
+EOF
+ cat > b/BUILD <<EOF
+java_library(
+ name = "b",
+ srcs = ["B.java"],
+ deps = ["@x_repo//x"],
+ visibility = ["//visibility:public"],
+)
+EOF
+
+ cp -r a b $external_dir
+
+ touch $external_dir/WORKSPACE
+ cat > $external_dir/x/X.java <<EOF
+package x;
+
+public class X {
+ public static void print() {
+ System.out.println("X");
+ }
+}
+EOF
+ cat > $external_dir/x/BUILD <<EOF
+java_library(
+ name = "x",
+ srcs = ["X.java"],
+ visibility = ["//visibility:public"],
+)
+EOF
+
+ cat > WORKSPACE <<EOF
+local_repository(
+ name = "x_repo",
+ path = "$external_dir",
+)
+EOF
+
+ bazel build @x_repo//a >& $TEST_log && fail "Building @x_repo//a should error out"
+ expect_log "** Please add the following dependencies:"
+ expect_log "@x_repo//x to @x_repo//a"
+}
+
run_suite "local repository tests"
diff --git a/src/test/shell/bazel/local_repository_test_jdk8.sh b/src/test/shell/bazel/local_repository_test_jdk8.sh
deleted file mode 100755
index ce7184cb3c..0000000000
--- a/src/test/shell/bazel/local_repository_test_jdk8.sh
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/bin/bash
-#
-# Copyright 2015 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# Test parts of the local_repository binding which are broken with jdk7
-#
-
-# Load the test setup defined in the parent directory
-CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
-source "${CURRENT_DIR}/../integration_test_setup.sh" \
- || { echo "integration_test_setup.sh not found!" >&2; exit 1; }
-
-# Creates an indirect dependency on X from A and make sure the error message
-# refers to the correct label, both in an external repository and not.
-function test_indirect_dep_message() {
- local external_dir=$TEST_TMPDIR/ext-dir
- mkdir -p a b $external_dir/x
- cat > a/A.java <<EOF
-package a;
-
-import x.X;
-
-public class A {
- public static void main(String args[]) {
- X.print();
- }
-}
-EOF
- cat > a/BUILD <<EOF
-java_binary(
- name = "a",
- main_class = "a.A",
- srcs = ["A.java"],
- deps = ["//b"],
-)
-EOF
-
-
- cat > b/B.java <<EOF
-package b;
-
-public class B {
- public static void print() {
- System.out.println("B");
- }
-}
-EOF
- cat > b/BUILD <<EOF
-java_library(
- name = "b",
- srcs = ["B.java"],
- deps = ["@x_repo//x"],
- visibility = ["//visibility:public"],
-)
-EOF
-
- cp -r a b $external_dir
-
- touch $external_dir/WORKSPACE
- cat > $external_dir/x/X.java <<EOF
-package x;
-
-public class X {
- public static void print() {
- System.out.println("X");
- }
-}
-EOF
- cat > $external_dir/x/BUILD <<EOF
-java_library(
- name = "x",
- srcs = ["X.java"],
- visibility = ["//visibility:public"],
-)
-EOF
-
- cat > WORKSPACE <<EOF
-local_repository(
- name = "x_repo",
- path = "$external_dir",
-)
-EOF
-
- bazel build @x_repo//a >& $TEST_log && fail "Building @x_repo//a should error out"
- expect_log "** Please add the following dependencies:"
- expect_log "@x_repo//x to @x_repo//a"
-}
-
-run_suite "local repository tests for jdk8 only"
diff --git a/src/test/shell/integration/BUILD b/src/test/shell/integration/BUILD
index fe43ff535f..bd588727e9 100644
--- a/src/test/shell/integration/BUILD
+++ b/src/test/shell/integration/BUILD
@@ -79,7 +79,6 @@ sh_test(
],
shard_count = 5,
tags = [
- "jdk8",
"no_windows",
],
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
@@ -306,7 +305,6 @@ sh_test(
],
shard_count = 3,
tags = [
- "jdk8",
"no_windows",
],
)
@@ -327,7 +325,6 @@ sh_test(
flaky = 1,
shard_count = 3,
tags = [
- "jdk8",
"no_windows",
],
)
diff --git a/tools/jdk/BUILD b/tools/jdk/BUILD
index 4d92e13b19..689bc138d7 100644
--- a/tools/jdk/BUILD
+++ b/tools/jdk/BUILD
@@ -20,24 +20,9 @@ java_host_runtime_alias(name = "current_host_java_runtime")
java_toolchain_alias(name = "current_java_toolchain")
-config_setting(
- name = "jdk7",
- values = {"define": "JAVA_VERSION=1.7"},
-)
-
-genrule(
- name = "BUILD-jdk7",
- srcs = [":BUILD"],
- outs = ["BUILD.jdk7"],
- cmd = "sed -e 's/_version = \"8\"/_version = \"7\"/' -e 's/javac_supports_workers = 1/javac_supports_workers = 0/' -e 's/forcibly_disable_header_compilation = 0/forcibly_disable_header_compilation = 1/g' -e 's/:JavaBuilder_deploy/:VanillaJavaBuilder_deploy/' $< > $@",
-)
-
filegroup(
name = "BUILD-jdk",
- srcs = select({
- ":jdk7": [":BUILD-jdk7"],
- "//conditions:default": [":BUILD"],
- }),
+ srcs = [":BUILD"],
)
# This is necessary to get the *host* Java runtime. Depending on