blob: 26d4cdc50d70bb5bcac0babf8e3fc4ea30773346 [file] [log] [blame]
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/components.gni")
import("//build/cpp/sdk_shared_library.gni")
import("//build/cpp/sdk_source_set.gni")
import("//build/test.gni")
sdk_source_set("cpp") {
category = "partner"
sdk_name = "vfs_cpp"
include_base = "//sdk"
stable = true
sources = [
"composed_service_dir.h",
"lazy_dir.h",
"node.h",
"pseudo_dir.h",
"pseudo_file.h",
"remote_dir.h",
"service.h",
"vmo_file.h",
]
public_deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_hlcpp",
"//sdk/lib/fdio",
"//sdk/lib/fidl/cpp",
"//zircon/system/ulib/async",
"//zircon/system/ulib/zx",
]
deps = [ "//sdk/lib/vfs/internal:vfs_internal" ]
public_configs = [ "//sdk/config" ]
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
#
# **WARNING**: This library is currently undergoing an API overhaul. In the meantime, please reach
# out to the storage team before adding new entries to this allow-list.
#
# See https://fxbug.dev/311176363 for details.
#
# TODO(https://fxbug.dev/336617685): Relax this visibility list for public SDK usage once this
# library is compatible with the new C++ FIDL bindings, and has support for io2 rights.
visibility = [
":*",
"//build/sdk:*",
"//sdk/ctf/tests/pkg/svc:*",
"//sdk/lib/driver/devicetree/testing:*",
"//sdk/lib/sys/cpp:*",
"//sdk/lib/sys/cpp/testing:*",
"//sdk/lib/sys/cpp/tests:*",
"//sdk/lib/sys/inspect/cpp:*",
"//sdk/lib/sys/service/cpp:*",
"//sdk/lib/vfs/cpp/testing:*",
"//src/*",
"//third_party/tcpdump:*",
"//vendor/google/*",
]
}
test("vfs_cpp_unittests") {
sources = [
"tests/composed_service_dir_test.cc",
"tests/lazy_dir_test.cc",
"tests/pseudo_dir_test.cc",
"tests/pseudo_file_test.cc",
"tests/remote_dir_test.cc",
"tests/service_test.cc",
"tests/vmo_file_test.cc",
]
deps = [
":cpp",
"//sdk/lib/fdio",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
]
}
fuchsia_unittest_package("vfs_cpp_tests") {
deps = [ ":vfs_cpp_unittests" ]
}
group("tests") {
testonly = true
public_deps = [ ":vfs_cpp_tests" ]
}