blob: d623762bed12e572863e8ba4e17162320909cb63 [file] [log] [blame]
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(["**"]) + [
"//src/test/java/com/google/devtools/build/lib/analysis/mock:srcs",
"//src/test/java/com/google/devtools/build/lib/analysis/platform:srcs",
"//src/test/java/com/google/devtools/build/lib/analysis/skylark/annotations/processor:srcs",
"//src/test/java/com/google/devtools/build/lib/analysis/util:srcs",
"//src/test/java/com/google/devtools/build/lib/analysis/whitelisting:srcs",
],
)
java_library(
name = "AnalysisTests_lib",
testonly = 1,
srcs = glob(
include = ["**/*.java"],
exclude = [
"AbstractConfiguredTargetTest.java",
"AnalysisUtilsTest.java",
"CachingTest.java",
"ConfiguredTargetTransitivePackagesTest.java",
"GeneratorConflictTest.java",
"PackageGroupBuildViewTest.java",
"RuleConfiguredTargetTest.java",
"SourceManifestActionTest.java",
],
),
deps = [
"//src/main/java/com/google/devtools/build/lib:android-rules",
"//src/main/java/com/google/devtools/build/lib:build",
"//src/main/java/com/google/devtools/build/lib:filetype",
"//src/main/java/com/google/devtools/build/lib:os_util",
"//src/main/java/com/google/devtools/build/lib:proto-rules",
"//src/main/java/com/google/devtools/build/lib:python-rules",
"//src/main/java/com/google/devtools/build/lib:syntax",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/analysis/platform",
"//src/main/java/com/google/devtools/build/lib/buildeventstream",
"//src/main/java/com/google/devtools/build/lib/buildeventstream/proto:build_event_stream_java_proto",
"//src/main/java/com/google/devtools/build/lib/causes",
"//src/main/java/com/google/devtools/build/lib/clock",
"//src/main/java/com/google/devtools/build/lib/cmdline",
"//src/main/java/com/google/devtools/build/lib/collect/nestedset",
"//src/main/java/com/google/devtools/build/lib/packages",
"//src/main/java/com/google/devtools/build/lib/pkgcache",
"//src/main/java/com/google/devtools/build/lib/rules/cpp",
"//src/main/java/com/google/devtools/build/lib/rules/java:java-compilation",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/autocodec",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/testutils",
"//src/main/java/com/google/devtools/build/lib/skyframe/serialization/testutils:depsutils",
"//src/main/java/com/google/devtools/build/lib/skyframe/trimming:trimmed_configuration_cache",
"//src/main/java/com/google/devtools/build/lib/skylarkinterface",
"//src/main/java/com/google/devtools/build/lib/util/io",
"//src/main/java/com/google/devtools/build/lib/vfs:pathfragment",
"//src/main/java/com/google/devtools/build/lib/vfs/inmemoryfs",
"//src/main/java/com/google/devtools/build/skyframe:skyframe-objects",
"//src/main/protobuf:extra_actions_base_java_proto",
"//src/test/java/com/google/devtools/build/lib/actions/util",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//src/test/java/com/google/devtools/build/lib/exec/util",
"//src/test/java/com/google/devtools/build/lib/packages:testutil",
"//src/test/java/com/google/devtools/build/lib/rules/platform:testutil",
"//src/test/java/com/google/devtools/build/lib/skyframe:testutil",
"//src/test/java/com/google/devtools/build/lib/skyframe/trimming:trimmable_test_fragments",
"//src/test/java/com/google/devtools/build/lib/testutil",
"//src/test/java/com/google/devtools/build/lib/testutil:JunitUtils",
"//src/test/java/com/google/devtools/build/lib/testutil:TestConstants",
"//src/test/java/com/google/devtools/build/skyframe:testutil",
"//third_party:auto_value",
"//third_party:guava",
"//third_party:guava-testlib",
"//third_party:junit4",
"//third_party:mockito",
"//third_party:truth",
],
)
java_test(
name = "AnalysisTests",
shard_count = 12,
test_class = "com.google.devtools.build.lib.AllTests",
runtime_deps = [
":AnalysisTests_lib",
"//src/test/java/com/google/devtools/build/lib:test_runner",
],
)
java_test(
name = "AnalysisUtilsTest",
srcs = ["AnalysisUtilsTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/test/java/com/google/devtools/build/lib/testutil",
"//src/test/java/com/google/devtools/build/lib/testutil:JunitUtils",
"//third_party:auto_value",
"//third_party:junit4",
"//third_party:truth",
],
)
java_test(
name = "AbstractConfiguredTargetTest",
srcs = ["AbstractConfiguredTargetTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/test/java/com/google/devtools/build/lib/actions/util",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//third_party:guava",
"//third_party:junit4",
"//third_party:truth",
],
)
java_test(
name = "CachingTest",
srcs = ["CachingTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//third_party:junit4",
"//third_party:truth",
],
)
java_test(
name = "ConfiguredTargetTransitivePackagesTest",
srcs = ["ConfiguredTargetTransitivePackagesTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib/cmdline",
"//src/main/java/com/google/devtools/build/lib/packages",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//src/test/java/com/google/devtools/build/lib/packages:testutil",
"//src/test/java/com/google/devtools/build/lib/skyframe:testutil",
"//third_party:guava",
"//third_party:junit4",
"//third_party:truth",
],
)
java_test(
name = "SourceManifestActionTest",
srcs = ["SourceManifestActionTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib:python-rules",
"//src/main/java/com/google/devtools/build/lib:util",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/collect/nestedset",
"//src/main/java/com/google/devtools/build/lib/vfs",
"//src/main/java/com/google/devtools/build/lib/vfs:pathfragment",
"//src/test/java/com/google/devtools/build/lib/actions/util",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//third_party:guava",
"//third_party:jsr305",
"//third_party:junit4",
"//third_party:truth",
],
)
java_test(
name = "RuleConfiguredTargetTest",
srcs = ["RuleConfiguredTargetTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/main/java/com/google/devtools/build/lib:events",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//third_party:guava",
"//third_party:junit4",
"//third_party:truth",
],
)
java_test(
name = "PackageGroupBuildViewTest",
srcs = ["PackageGroupBuildViewTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//third_party:junit4",
],
)
java_test(
name = "GeneratorConflictTest",
srcs = ["GeneratorConflictTest.java"],
deps = [
"//src/main/java/com/google/devtools/build/lib:build-base",
"//src/test/java/com/google/devtools/build/lib/analysis/util",
"//src/test/java/com/google/devtools/build/lib/testutil",
"//src/test/java/com/google/devtools/build/lib/testutil:JunitUtils",
"//third_party:junit4",
],
)
test_suite(
name = "AllAnalysisTests",
tests = [
":AbstractConfiguredTargetTest",
":AnalysisTests",
":AnalysisUtilsTest",
":CachingTest",
":ConfiguredTargetTransitivePackagesTest",
":GeneratorConflictTest",
":PackageGroupBuildViewTest",
":RuleConfiguredTargetTest",
":SourceManifestActionTest",
],
)