| # 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" |
| |
| 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. Please avoid new uses and |
| # prefer using the in-tree VFS at //src/storage/lib/vfs/cpp where possible. |
| # |
| # See https://fxbug.dev/311176363 for details. |
| # |
| 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_host:*", |
| "//src/devices/bin/driver_manager:*", |
| "//src/devices/sysmem/bin/sysmem_connector:*", |
| "//src/diagnostics/validator/inspect/lib/cpp:*", |
| "//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/storage/conformance/*", |
| "//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 = [ |
| "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" ] |
| } |