Split :tests into :test and :tests.
Split the :tests target into a :test target which contains the test
framework and :tests which collects all of the test cases. This allows
for all targets which define tests to depend on :test in order to define
tests, with :tests then depending on all targets which define tests. A
similar split should be considered for gms, samples, and benches.
Change-Id: Ic9f373ec0c1a8ea842fa68327e854db23477caae
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/371696
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index 862af28..b84ade9 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1899,6 +1899,23 @@
}
}
+ test_lib("test") {
+ sources = [
+ "tests/Test.cpp",
+ "tests/Test.h",
+ "tests/TestUtils.cpp",
+ "tests/TestUtils.h",
+ ]
+ deps = [
+ ":flags",
+ ":skia",
+ ":tool_utils",
+ ]
+ public_deps = [
+ ":gpu_tool_utils", # Test.h #includes headers from this target.
+ ]
+ }
+
import("gn/tests.gni")
test_lib("tests") {
sources = tests_sources + pathops_tests_sources
@@ -1920,6 +1937,7 @@
deps = [
":flags",
":skia",
+ ":test",
":tool_utils",
"experimental/skrive:tests",
"modules/skottie:tests",
@@ -1931,9 +1949,6 @@
"//third_party/libwebp",
"//third_party/zlib",
]
- public_deps = [
- ":gpu_tool_utils", # Test.h #includes headers from this target.
- ]
}
import("gn/bench.gni")