Skip to content

Commit

Permalink
Docgen BUILD file consolidation
Browse files Browse the repository at this point in the history
Standardizing internal/external BUILD file management.

This does unfortunately remove tests from `all_windows_tests`, which seems like it's
suffering from some bitrot (#4292 (comment)). We _could_ explicitly add the docgen 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: 379481390
  • Loading branch information
michajlo authored and copybara-github committed Jun 15, 2021
1 parent 882afdf commit 81b3561
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
1 change: 0 additions & 1 deletion src/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ test_suite(
":windows_tests",
"//src/test/cpp:all_windows_tests",
"//src/test/java/com/google/devtools/build/android:all_windows_tests",
"//src/test/java/com/google/devtools/build/docgen:all_windows_tests",
"//src/test/java/com/google/devtools/build/lib:all_windows_tests",
"//src/test/java/com/google/devtools/build/skyframe:all_windows_tests",
"//src/test/java/com/google/devtools/common/options:all_windows_tests",
Expand Down
34 changes: 4 additions & 30 deletions src/test/java/com/google/devtools/build/docgen/BUILD
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
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:__pkg__"],
visibility = ["//src:__subpackages__"],
)

java_test(
Expand All @@ -18,9 +17,10 @@ java_test(
srcs = ["DocumentationTests.java"],
shard_count = 1,
tags = ["docgen"],
deps = [
runtime_deps = [
":documentation-tests",
"//src/test/java/com/google/devtools/build/lib/testutil",
],
deps = [
"//src/test/java/com/google/devtools/build/lib/testutil:TestSuite",
"//third_party:junit4",
],
Expand All @@ -46,9 +46,6 @@ java_library(
"//src/main/java/com/google/devtools/build/lib/rules/cpp",
"//src/main/java/net/starlark/java/annot",
"//src/main/java/net/starlark/java/eval",
"//src/main/java/net/starlark/java/syntax",
"//src/test/java/com/google/devtools/build/lib/starlark/util",
"//src/test/java/com/google/devtools/build/lib/testutil",
"//third_party:guava",
"//third_party:junit4",
"//third_party:truth",
Expand All @@ -61,32 +58,9 @@ java_library(
srcs = glob(["testutil/*.java"]),
deps = [
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/actions:artifacts",
"//src/main/java/com/google/devtools/build/lib/analysis:analysis_cluster",
"//src/main/java/com/google/devtools/build/lib/analysis:configured_target",
"//src/main/java/com/google/devtools/build/lib/analysis:rule_definition_environment",
"//src/main/java/com/google/devtools/build/lib/packages",
],
)

test_suite(
name = "all_tests",
tags = ["docgen"],
)

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

test_suite(
name = "all_windows_tests",
tests = [
":windows_tests",
],
visibility = ["//src:__pkg__"],
)

0 comments on commit 81b3561

Please sign in to comment.