mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
extract out tests for //c10/util:base (#71908)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/71908 This reduces the dependencies of these tests and also the distance from each test to its primary input. ghstack-source-id: 150235100 Test Plan: This ought to be a no-op, rely on CI to validate. Reviewed By: malfet Differential Revision: D33815404 fbshipit-source-id: 8f69ebabe5f7bacba056b0f31e55161fc431a45e (cherry picked from commit 3906723bd5b9e9d1eb6f8e37b4173ad695658cd9)
This commit is contained in:
parent
2efee542fd
commit
9956965369
|
|
@ -2,29 +2,42 @@ def define_targets(rules):
|
|||
rules.test_suite(
|
||||
name = "tests",
|
||||
tests = [
|
||||
":core_and_util_tests",
|
||||
":core_and_typeid_tests",
|
||||
":util_base_tests",
|
||||
],
|
||||
visibility = ["//:__pkg__"],
|
||||
)
|
||||
|
||||
rules.cc_test(
|
||||
name = "core_and_util_tests",
|
||||
name = "core_and_typeid_tests",
|
||||
size = "small",
|
||||
srcs = rules.glob([
|
||||
"util/*.cpp",
|
||||
"core/*.cpp",
|
||||
"core/impl/*.cpp",
|
||||
]),
|
||||
]) + ["util/typeid_test.cpp"],
|
||||
copts = ["-Wno-deprecated-declarations"],
|
||||
deps = [
|
||||
"@com_google_googletest//:gtest_main",
|
||||
"//c10/core:base",
|
||||
"//c10/util:base",
|
||||
"//c10/util:typeid",
|
||||
],
|
||||
)
|
||||
|
||||
rules.cc_test(
|
||||
name = "util_base_tests",
|
||||
srcs = rules.glob(
|
||||
["util/*.cpp"],
|
||||
exclude = ["util/typeid_test.cpp"],
|
||||
),
|
||||
copts = ["-Wno-deprecated-declarations"],
|
||||
deps = [
|
||||
":Macros",
|
||||
":complex_math_test_common",
|
||||
":complex_test_common",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
"//c10/core:base",
|
||||
"//c10/macros",
|
||||
"//c10/util:base",
|
||||
"//c10/util:typeid",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user