load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
load("@fbcode_macros//build_defs:cpp_unittest.bzl", "cpp_unittest")
load("@fbsource//tools/target_determinator/macros:ci.bzl", "ci")

oncall("fbcode_entropy_wardens_folly")

fbcode_target(
    _kind = cpp_unittest,
    name = "constexpr_test",
    srcs = ["ConstexprTest.cpp"],
    deps = [
        "//folly/portability:constexpr",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "fcntl_test",
    srcs = ["FcntlTest.cpp"],
    labels = ci.labels(
        ci.windows(ci.mode("fbcode//mode/win")),
    ),
    deps = [
        "//folly/portability:fcntl",
        "//folly/portability:unistd",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "filesystem_test",
    srcs = ["FilesystemTest.cpp"],
    deps = [
        "//folly/portability:filesystem",
        "//folly/portability:gmock",
        "//folly/portability:gtest",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "libgen_test",
    srcs = ["LibgenTest.cpp"],
    deps = [
        "//folly/portability:gtest",
        "//folly/portability:libgen",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "openssl_portability_test",
    srcs = ["OpenSSLPortabilityTest.cpp"],
    deps = [
        "//folly/portability:gtest",
        "//folly/ssl:openssl_ptr_types",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "pthread_test",
    srcs = ["PThreadTest.cpp"],
    deps = [
        "//folly/portability:gtest",
        "//folly/portability:pthread",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "time_test",
    srcs = ["TimeTest.cpp"],
    deps = [
        "//folly/portability:gtest",
        "//folly/portability:time",
        "//folly/test:test_utils",
    ],
)

fbcode_target(
    _kind = cpp_unittest,
    name = "unistd_test",
    srcs = ["UnistdTest.cpp"],
    labels = ci.labels(
        ci.windows(ci.mode("fbcode//mode/win")),
    ),
    deps = [
        "//folly/portability:unistd",
    ],
)
