Skip to content

Commit

Permalink
Clean up and consolidate BUILD files
Browse files Browse the repository at this point in the history
WRT windows tests, copy pasting from another change...

This does unfortunately remove tests from `all_windows_tests`, which seems like it's
suffering from some bitrot (bazelbuild#4292 (comment)). We _could_ explicitly add the tests, and while it's bound to be an
unpopular opinion, I think we should avoid setting the precedent of explicitly
enumerating windows tests as it's unlikely to scale.

PiperOrigin-RevId: 379819307
  • Loading branch information
michajlo authored and copybara-github committed Jun 16, 2021
1 parent fa4e14b commit 9c17adc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 31 deletions.
1 change: 0 additions & 1 deletion src/test/java/com/google/devtools/build/lib/skyframe/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ test_suite(
tests = [
":windows_tests",
"//src/test/java/com/google/devtools/build/lib/skyframe/packages:all_windows_tests",
"//src/test/java/com/google/devtools/build/lib/skyframe/serialization:all_windows_tests",
],
visibility = ["//src/test/java/com/google/devtools/build/lib:__pkg__"],
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,28 @@
load("@rules_java//java:defs.bzl", "java_library", "java_test")

package(
default_testonly = 1,
default_visibility = ["//src:__subpackages__"],
)
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
testonly = 0,
srcs = glob(["**"]),
visibility = ["//src/test/java/com/google/devtools/build/lib:__pkg__"],
visibility = ["//src:__subpackages__"],
)

java_library(
name = "serialization-tests",
testonly = 1,
srcs = glob(["*.java"]),
srcs = glob(["**/*.java"]),
deps = [
"//src/main/java/com/google/devtools/build/lib/bugreport",
"//src/main/java/com/google/devtools/build/lib/cmdline",
"//src/main/java/com/google/devtools/build/lib/events",
"//src/main/java/com/google/devtools/build/lib/packages",
"//src/main/java/com/google/devtools/build/lib/skyframe:precomputed_value",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization",
"//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/protobuf:build_java_proto",
"//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:jsr305",
"//third_party:junit4",
"//third_party:mockito",
"//third_party:truth",
Expand All @@ -48,20 +38,3 @@ java_test(
"//src/test/java/com/google/devtools/build/lib:test_runner",
],
)

test_suite(
name = "windows_tests",
tags = [
"-no_windows",
"-slow",
],
visibility = ["//visibility:private"],
)

test_suite(
name = "all_windows_tests",
tests = [
":windows_tests",
],
visibility = ["//src/test/java/com/google/devtools/build/lib/skyframe:__pkg__"],
)

0 comments on commit 9c17adc

Please sign in to comment.