blob: 219d9cd2b8dca78ee83a7cec287672654acca89c [file] [log] [blame] [edit]
# 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_source_set.gni")
import("//build/test.gni")
sdk_source_set("cpp") {
category = "partner"
sdk_name = "vfs_cpp"
include_base = "//sdk"
sources = [
"composed_service_dir.cc",
"composed_service_dir.h",
"flags.h",
"internal/connection.cc",
"internal/connection.h",
"internal/directory.cc",
"internal/directory.h",
"internal/directory_connection.cc",
"internal/directory_connection.h",
"internal/dirent_filler.cc",
"internal/dirent_filler.h",
"internal/file.cc",
"internal/file.h",
"internal/file_connection.cc",
"internal/file_connection.h",
"internal/node.cc",
"internal/node.h",
"internal/node_connection.cc",
"internal/node_connection.h",
"lazy_dir.cc",
"lazy_dir.h",
"pseudo_dir.cc",
"pseudo_dir.h",
"pseudo_file.cc",
"pseudo_file.h",
"remote_dir.cc",
"remote_dir.h",
"service.cc",
"service.h",
"vmo_file.cc",
"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",
]
public_configs = [ "//sdk/config" ]
# ________ _________ ________ ________
# |\ ____\|\___ ___\\ __ \|\ __ \
# \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \
# \ \_____ \ \ \ \ \ \ \\\ \ \ ____\
# \|____|\ \ \ \ \ \ \ \\\ \ \ \___|
# ____\_\ \ \ \__\ \ \_______\ \__\
# |\_________\ \|__| \|_______|\|__|
# \|_________|
#
# New code should use //src/storage/lib/vfs/cpp instead. https://fxbug.dev/103032 tracks removal
# of this library.
#
# To remove items from the allowlist, please send a change to one of the OWNERS of
# this file to remove an element from the visibility list below.
#
# Please allowlist entire directories rather than individual targets as it
# requires less allowlist churn over time.
#
# To regenerate:
# scripts/gn/trim_visibility.py --target=//sdk/lib/vfs/cpp
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/developer/build_info:*",
"//src/developer/forensics/feedback_data:*",
"//src/devices/bin/driver_host2:*",
"//src/devices/bin/driver_manager/v2:*",
"//src/devices/sysmem/bin/sysmem_connector:*",
"//src/diagnostics/validator/inspect/lib/cpp:*",
"//src/graphics/bin/opencl_loader:*",
"//src/graphics/bin/opencl_loader/test:*",
"//src/graphics/bin/vulkan_loader:*",
"//src/graphics/bin/vulkan_loader/test:*",
"//src/lib/metrics_buffer:*",
"//src/lib/vulkan/gapii-pkg:*",
"//src/lib/vulkan/vulkan-validation-pkg:*",
"//src/media/audio/audio_core/testing/integration:*",
"//src/media/codec/factory:*",
"//src/media/lib/codec_impl:*",
"//src/modular/bin/sessionmgr:*",
"//src/modular/lib/pseudo_dir:*",
"//src/storage/conformance/conformance_harness/sdkcpp:*",
"//src/sys/early_boot_instrumentation:*",
"//src/sys/early_boot_instrumentation/test:*",
"//src/tests/fidl/compatibility/cpp:*",
"//src/tests/fidl/compatibility/llcpp:*",
"//src/ui/a11y/bin/a11y_manager/tests/util:*",
"//src/ui/a11y/lib/configuration/tests:*",
"//src/ui/lib/escher:*",
"//third_party/tcpdump:*",
"//vendor/google/*",
]
}
test("vfs_cpp_unittests") {
sources = [
"composed_service_dir_unittest.cc",
"internal/connection_unittest.cc",
"internal/file_unittest.cc",
"lazy_dir_unittest.cc",
"pseudo_dir_unittest.cc",
"pseudo_file_unittest.cc",
"remote_dir_unittest.cc",
"service_unittest.cc",
"vmo_file_unittest.cc",
]
deps = [
":cpp",
"testing",
"//sdk/lib/sys/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//src/testing/fidl:placeholders_hlcpp",
]
}
fuchsia_unittest_package("vfs_cpp_tests") {
deps = [ ":vfs_cpp_unittests" ]
}
group("tests") {
testonly = true
public_deps = [ ":vfs_cpp_tests" ]
}