diff --git a/src/test/java/com/google/devtools/build/lib/BUILD b/src/test/java/com/google/devtools/build/lib/BUILD index 5b2a9302f28331..48350495d8652d 100644 --- a/src/test/java/com/google/devtools/build/lib/BUILD +++ b/src/test/java/com/google/devtools/build/lib/BUILD @@ -22,6 +22,7 @@ filegroup( "//src/test/java/com/google/devtools/build/lib/bugreport:srcs", "//src/test/java/com/google/devtools/build/lib/buildtool:srcs", "//src/test/java/com/google/devtools/build/lib/cmdline:srcs", + "//src/test/java/com/google/devtools/build/lib/collect:srcs", "//src/test/java/com/google/devtools/build/lib/concurrent:srcs", "//src/test/java/com/google/devtools/build/lib/dynamic:srcs", "//src/test/java/com/google/devtools/build/lib/events:srcs", @@ -99,61 +100,6 @@ java_library( ], ) -java_test( - name = "collect_test", - size = "small", - srcs = glob(["collect/*.java"]), - tags = [ - "foundations", - ], - test_class = "com.google.devtools.build.lib.AllTests", - deps = [ - ":AllTests", - "//src/main/java/com/google/devtools/build/lib/collect", - "//src/main/java/com/google/devtools/build/lib/collect/nestedset", - "//src/test/java/com/google/devtools/build/lib/starlark/util", - "//src/test/java/com/google/devtools/build/lib/testutil", - "//src/test/java/com/google/devtools/build/lib/testutil:JunitUtils", - "//third_party:guava", - "//third_party:guava-testlib", - "//third_party:junit4", - "//third_party:truth", - ], -) - -java_test( - name = "collect_nestedset_test", - size = "small", - srcs = glob(["collect/nestedset/*.java"]), - tags = [ - "foundations", - ], - test_class = "com.google.devtools.build.lib.AllTests", - deps = [ - ":AllTests", - "//src/main/java/com/google/devtools/build/lib/actions:commandline_item", - "//src/main/java/com/google/devtools/build/lib/collect/nestedset", - "//src/main/java/com/google/devtools/build/lib/collect/nestedset:fingerprint_cache", - "//src/main/java/com/google/devtools/build/lib/collect/nestedset:testutils", - "//src/main/java/com/google/devtools/build/lib/skyframe/serialization", - "//src/main/java/com/google/devtools/build/lib/skyframe/serialization:constants", - "//src/main/java/com/google/devtools/build/lib/skyframe/serialization/testutils", - "//src/main/java/com/google/devtools/build/lib/util", - "//src/main/java/com/google/devtools/build/lib/vfs", - "//src/main/java/com/google/devtools/build/lib/vfs:pathfragment", - "//src/main/java/net/starlark/java/eval", - "//src/test/java/com/google/devtools/build/lib/starlark/util", - "//src/test/java/com/google/devtools/build/lib/testutil", - "//src/test/java/com/google/devtools/build/lib/testutil:JunitUtils", - "//third_party:guava", - "//third_party:guava-testlib", - "//third_party:junit4", - "//third_party:mockito", - "//third_party:truth", - "//third_party/protobuf:protobuf_java", - ], -) - java_test( name = "runtime-tests", srcs = glob( @@ -290,9 +236,8 @@ test_suite( test_suite( name = "foundations", tests = [ - ":collect_nestedset_test", - ":collect_test", "//src/test/java/com/google/devtools/build/lib/cmdline:CmdLineTests", + "//src/test/java/com/google/devtools/build/lib/collect:CollectTests", "//src/test/java/com/google/devtools/build/lib/concurrent:ConcurrentTests", "//src/test/java/com/google/devtools/build/lib/events:EventsTests", "//src/test/java/com/google/devtools/build/lib/testutil:TestUtilTests", diff --git a/src/test/java/com/google/devtools/build/lib/collect/BUILD b/src/test/java/com/google/devtools/build/lib/collect/BUILD new file mode 100644 index 00000000000000..ec68e4e9240145 --- /dev/null +++ b/src/test/java/com/google/devtools/build/lib/collect/BUILD @@ -0,0 +1,51 @@ +load("@rules_java//java:defs.bzl", "java_library", "java_test") + +package( + default_testonly = 1, + default_visibility = ["//src:__subpackages__"], +) + +filegroup( + name = "srcs", + testonly = 0, + srcs = glob(["**"]), + visibility = ["//src:__subpackages__"], +) + +java_library( + name = "CollectTests_lib", + srcs = glob( + [ + "*.java", + "nestedset/*.java", + ], + ), + deps = [ + "//src/main/java/com/google/devtools/build/lib/actions:commandline_item", + "//src/main/java/com/google/devtools/build/lib/collect", + "//src/main/java/com/google/devtools/build/lib/collect/nestedset", + "//src/main/java/com/google/devtools/build/lib/collect/nestedset:fingerprint_cache", + "//src/main/java/com/google/devtools/build/lib/collect/nestedset:testutils", + "//src/main/java/com/google/devtools/build/lib/skyframe/serialization", + "//src/main/java/com/google/devtools/build/lib/util", + "//src/main/java/com/google/devtools/build/lib/vfs", + "//src/main/java/net/starlark/java/eval", + "//src/test/java/com/google/devtools/build/lib/starlark/util", + "//third_party:guava", + "//third_party:guava-testlib", + "//third_party:junit4", + "//third_party:mockito", + "//third_party:truth", + "//third_party/protobuf:protobuf_java", + ], +) + +java_test( + name = "CollectTests", + size = "small", + test_class = "com.google.devtools.build.lib.AllTests", + runtime_deps = [ + ":CollectTests_lib", + "//src/test/java/com/google/devtools/build/lib:test_runner", + ], +)