load("@fbsource//tools/build_defs/dirsync:fb_dirsync_cpp_unittest.bzl", "fb_dirsync_cpp_unittest")
load("@fbsource//tools/target_determinator/macros:ci.bzl", "ci")

oncall("fbcode_entropy_wardens_folly")

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

fb_dirsync_cpp_unittest(
    name = "fcntl_test",
    srcs = ["FcntlTest.cpp"],
    labels = ci.labels(
        ci.windows(ci.mode("fbcode//mode/win")),
    ),
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//folly/portability:fcntl",
        "//folly/portability:unistd",
    ],
)

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

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

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

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

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

fb_dirsync_cpp_unittest(
    name = "unistd_test",
    srcs = ["UnistdTest.cpp"],
    labels = ci.labels(
        ci.windows(ci.mode("fbcode//mode/win")),
    ),
    deps = [
        "fbsource//third-party/googletest:gtest",
        "//folly/portability:unistd",
    ],
)
