xref: /aosp_15_r20/external/executorch/extension/tensor/test/targets.bzl (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2
3def define_common_targets():
4    """Defines targets that should be shared between fbcode and xplat.
5
6    The directory containing this targets.bzl file should also contain both
7    TARGETS and BUCK files that call this function.
8    """
9
10    for aten_mode in (True, False):
11        aten_suffix = ("_aten" if aten_mode else "")
12
13        runtime.cxx_test(
14            name = "test" + aten_suffix,
15            srcs = [
16                "tensor_ptr_maker_test.cpp",
17                "tensor_ptr_test.cpp",
18            ],
19            deps = [
20                "//executorch/extension/tensor:tensor" + aten_suffix,
21            ],
22        )
23