Skip to content

Commit

Permalink
Clean up / add BUILD file for collections package
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 379937455
  • Loading branch information
michajlo authored and copybara-github committed Jun 17, 2021
1 parent 912fa90 commit 2611ec0
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 57 deletions.
59 changes: 2 additions & 57 deletions src/test/java/com/google/devtools/build/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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",
Expand Down
51 changes: 51 additions & 0 deletions src/test/java/com/google/devtools/build/lib/collect/BUILD
Original file line number Diff line number Diff line change
@@ -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",
],
)

0 comments on commit 2611ec0

Please sign in to comment.