Migrate src/test/j/c/g/devtools/build/lib/remote/downloader to shared BUILD file.
-load("@rules_java//java:defs.bzl", "java_test")
+load("@rules_java//java:defs.bzl", "java_library", "java_test")
package(
default_testonly = 1,
default_visibility = ["//src:__subpackages__"],
)
+licenses(["notice"])
+
filegroup(
name = "srcs",
testonly = 0,
srcs = glob(["**"]),
- visibility = ["//src/test/java/com/google/devtools/build/lib/remote:__pkg__"],
+ visibility = ["//src:__subpackages__"],
)
-java_test(
- name = "RemoteDownloaderTestSuite",
- srcs = glob(["*.java"]),
- tags = [
- "requires-network",
- "rules",
+java_library(
+ name = "RemoteDownloaderTests_lib",
+ srcs = glob(
+ [
+ "*.java",
],
+ ),
deps = [
"//src/main/java/com/google/devtools/build/lib/bazel/repository/cache",
"//src/main/java/com/google/devtools/build/lib/bazel/repository/downloader",
"//src/main/java/com/google/devtools/build/lib/events",
- "//src/main/java/com/google/devtools/build/lib/remote:ReferenceCountedChannel",
- "//src/main/java/com/google/devtools/build/lib/remote:Retrier",
+ "//src/main/java/com/google/devtools/build/lib/remote",
"//src/main/java/com/google/devtools/build/lib/remote/common",
"//src/main/java/com/google/devtools/build/lib/remote/downloader",
"//src/main/java/com/google/devtools/build/lib/remote/grpc",
"//src/main/java/com/google/devtools/build/lib/remote/options",
"//src/main/java/com/google/devtools/build/lib/remote/util",
- "//src/main/java/com/google/devtools/build/lib/util",
"//src/main/java/com/google/devtools/build/lib/vfs",
"//src/main/java/com/google/devtools/common/options",
- "//src/test/java/com/google/devtools/build/lib:test_runner",
- "//src/test/java/com/google/devtools/build/lib/events:testutil",
"//src/test/java/com/google/devtools/build/lib/remote/util",
"//src/test/java/com/google/devtools/build/lib/testutil",
"//src/test/java/com/google/devtools/build/lib/testutil:TestUtils",
- "//src/test/java/com/google/devtools/build/lib/vfs/util",
"//third_party:guava",
"//third_party:junit4",
"//third_party:mockito",
@@ -51,3 +48,16 @@ java_test(
"@remoteapis//:build_bazel_remote_execution_v2_remote_execution_java_proto",
],
)
+
+java_test(
+ name = "RemoteDownloaderTests",
+ tags = [
+ "requires-network",
+ "rules",
+ ],
+ test_class = "com.google.devtools.build.lib.AllTests",
+ runtime_deps = [
+ ":RemoteDownloaderTests_lib",
+ "//src/test/java/com/google/devtools/build/lib:test_runner",
+ ],
+)
