diff --git a/c10/test/build.bzl b/c10/test/build.bzl index 0c6b2a5486f7..0b6111b0d611 100644 --- a/c10/test/build.bzl +++ b/c10/test/build.bzl @@ -1,6 +1,14 @@ def define_targets(rules): - rules.cc_test( + rules.test_suite( name = "tests", + tests = [ + ":core_and_util_tests", + ], + visibility = ["//:__pkg__"], + ) + + rules.cc_test( + name = "core_and_util_tests", size = "small", srcs = rules.glob([ "util/*.cpp", @@ -18,7 +26,6 @@ def define_targets(rules): "//c10/util:base", "//c10/util:typeid", ], - visibility = ["//:__pkg__"], ) rules.cc_library( diff --git a/tools/bazel.bzl b/tools/bazel.bzl index a088024a6833..3589d09df314 100644 --- a/tools/bazel.bzl +++ b/tools/bazel.bzl @@ -16,4 +16,5 @@ rules = struct( if_cuda = if_cuda, requires_cuda_enabled = requires_cuda_enabled, select = select, + test_suite = native.test_suite, )