load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target", "non_fbcode_target")
load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")

oncall("executorch")

fbcode_target(_kind = runtime.python_test,
    name = "test_program",
    srcs = [
        "test_program.py",
    ],
    deps = [
        "//executorch/exir:schema",
        "//executorch/exir/_serialize:lib",
        "//executorch/exir/tests:lib",
    ],
)

fbcode_target(_kind = runtime.python_test,
    name = "test_flatbuffer",
    srcs = [
        "test_flatbuffer.py",
    ],
    deps = [
        "//executorch/exir/_serialize:lib",
    ],
)

fbcode_target(_kind = runtime.python_test,
    name = "test_flatbuffer_program",
    srcs = [
        "test_flatbuffer_program.py",
    ],
    deps = [
        "//executorch/exir/_serialize:lib",
    ],
)

fbcode_target(_kind = runtime.python_test,
    name = "test_cord",
    srcs = [
        "test_cord.py",
    ],
    deps = [
        "//executorch/exir/_serialize:lib",
    ],
)

fbcode_target(_kind = runtime.python_test,
    name = "test_named_data_store",
    srcs = [
        "test_named_data_store.py",
    ],
    deps = [
        "//executorch/exir/_serialize:lib",
    ],
)

fbcode_target(_kind = runtime.python_test,
    name = "test_serialize",
    srcs = [
        "test_serialize.py",
    ],
    deps = [
        "//executorch/exir:schema",
        "//executorch/exir/_serialize:lib",
        "//executorch/exir/emit:lib",
        "//executorch/exir/capture:config",
        "//executorch/exir/tests:lib",
    ],
)

fbcode_target(_kind = runtime.python_test,
    name = "test_ptn",
    srcs = [
        "test_ptn.py",
    ],
    deps = [
        "fbsource//third-party/pypi/safetensors:safetensors",
        "//caffe2:torch",
        "//executorch/exir/_serialize:ptn",
    ],
)

fbcode_target(_kind = runtime.python_test,
    name = "test_ptn_samples",
    srcs = [
        "test_ptn_samples.py",
    ],
    deps = [
        "//caffe2:torch",
        "//executorch/exir/_serialize:ptn",
        "//executorch/exir/_serialize:ptn_samples",
    ],
)
