| # 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/fuzz.gni") | |
| import("//build/test.gni") | |
| source_set("test_support") { | |
| public = [ "tests/dir_test_util.h" ] | |
| public_deps = [ ":cpp" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| ":fs-connection-test", | |
| ":fs-connection-test-pkg", | |
| ":fs-fuzzers", | |
| ":fs-vnode-test", | |
| ":fs-vnode-test-pkg", | |
| "inspect:tests", | |
| "journal:tests", | |
| "transaction:tests", | |
| ] | |
| } | |
| test("fs-vnode-test") { | |
| output_name = "fs-vnode-test" | |
| sources = [ | |
| "tests/lazy_dir_tests.cc", | |
| "tests/pseudo_dir_tests.cc", | |
| "tests/pseudo_file_tests.cc", | |
| "tests/remote_dir_tests.cc", | |
| "tests/service_tests.cc", | |
| "tests/teardown_tests.cc", | |
| "tests/vfs_tests.cc", | |
| "tests/vmo_file_tests.cc", | |
| "tests/watcher_test.cc", | |
| ] | |
| deps = [ | |
| ":cpp", | |
| ":death_test", | |
| ":test_support", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp_testing", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//sdk/lib/async-testing", | |
| "//sdk/lib/fdio", | |
| "//sdk/lib/fidl", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/sync:sync-cpp", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| } | |
| expect_includes("death_test") { | |
| includes = [ "//src/sys/test_runners/gtest/death_test.shard.cml" ] | |
| } | |
| test("fs-connection-test") { | |
| output_name = "fs-connection-test" | |
| sources = [ | |
| "tests/advisory_lock_tests.cc", | |
| "tests/connection_contract_tests.cc", | |
| "tests/connection_integration_tests.cc", | |
| "tests/connection_rights_tests.cc", | |
| "tests/paging_test.cc", | |
| ] | |
| deps = [ | |
| ":connection", | |
| ":cpp", | |
| ":death_test", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp", | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp_testing", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async-loop:async-loop-default", | |
| "//sdk/lib/fdio", | |
| "//sdk/lib/fidl", | |
| "//sdk/lib/zxio", | |
| "//src/lib/fxl", | |
| "//src/lib/fxl/test:gtest_main", | |
| "//src/storage/memfs:cpp", | |
| "//third_party/googletest:gmock", | |
| "//third_party/googletest:gtest", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/sync", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| } | |
| fuchsia_library_fuzzer("vmo_file-fuzzer") { | |
| sources = [ "tests/vmo_file-fuzzer.cc" ] | |
| deps = [ "//src/storage/lib/vfs/cpp" ] | |
| } | |
| fuchsia_fuzzer_component("vmo-file-fuzzer-component") { | |
| manifest = "meta/vmo_file-fuzzer.cml" | |
| deps = [ ":vmo_file-fuzzer" ] | |
| } | |
| fuchsia_fuzzer_package("fs-fuzzers") { | |
| cpp_fuzzer_components = [ ":vmo-file-fuzzer-component" ] | |
| } | |
| fuchsia_unittest_package("fs-connection-test-pkg") { | |
| package_name = "fs-connection-test" | |
| deps = [ ":fs-connection-test" ] | |
| } | |
| fuchsia_unittest_package("fs-vnode-test-pkg") { | |
| package_name = "fs-vnode-test" | |
| deps = [ ":fs-vnode-test" ] | |
| } | |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## | |
| # | |
| # ________ _________ ________ ________ | |
| # |\ ____\|\___ ___\\ __ \|\ __ \ | |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ | |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ | |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| | |
| # ____\_\ \ \ \__\ \ \_______\ \__\ | |
| # |\_________\ \|__| \|_______|\|__| | |
| # \|_________| | |
| # | |
| # | |
| # AUTO-GENERATED - DO NOT EDIT | |
| # | |
| # The targets below are auto-generated based on the targets defined in the | |
| # BUILD.bazel file from the same directory. If you made changes to targets in | |
| # Bazel, instead of editing this file manually, run: | |
| # | |
| # > fx bazel2gn | |
| # | |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and | |
| # rerun bazel2gn. | |
| import("//build/tools/bazel2gn/bazel_migration.gni") | |
| source_set("vfs_headers") { | |
| public = [] | |
| public += [ | |
| "debug.h", | |
| "shared_mutex.h", | |
| "vfs.h", | |
| "vfs_types.h", | |
| "vnode.h", | |
| ] | |
| if (is_fuchsia) { | |
| public += [ | |
| "fuchsia_vfs.h", | |
| "lazy_dir.h", | |
| "managed_vfs.h", | |
| "paged_vfs.h", | |
| "paged_vnode.h", | |
| "pager_thread_pool.h", | |
| "pseudo_dir.h", | |
| "pseudo_file.h", | |
| "ref_counted.h", | |
| "remote_dir.h", | |
| "service.h", | |
| "synchronous_vfs.h", | |
| "ticker.h", | |
| "vmo_file.h", | |
| "watcher.h", | |
| ] | |
| } | |
| visibility = [ ":*" ] | |
| public_deps = [] | |
| public_deps += [ | |
| "//sdk/fidl/fuchsia.io:fuchsia.io_cpp", | |
| "//sdk/lib/fdio:constants", | |
| "//sdk/lib/fit", | |
| "//zircon/system/ulib/fbl", | |
| "//zircon/system/ulib/zx", | |
| ] | |
| if (is_fuchsia) { | |
| public_deps += [ | |
| "//sdk/fidl/fuchsia.fs:fuchsia.fs_cpp", | |
| "//sdk/lib/async", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/file-lock:cpp", | |
| ] | |
| } | |
| } | |
| source_set("connection") { | |
| if (is_fuchsia) { | |
| sources = [ | |
| "connection/advisory_lock.cc", | |
| "connection/connection.cc", | |
| "connection/directory_connection.cc", | |
| "connection/file_connection.cc", | |
| "connection/node_connection.cc", | |
| "connection/remote_file_connection.cc", | |
| "connection/stream_file_connection.cc", | |
| ] | |
| } else { | |
| sources = [] | |
| } | |
| if (is_fuchsia) { | |
| public = [ | |
| "connection/advisory_lock.h", | |
| "connection/connection.h", | |
| "connection/directory_connection.h", | |
| "connection/file_connection.h", | |
| "connection/node_connection.h", | |
| "connection/remote_file_connection.h", | |
| "connection/stream_file_connection.h", | |
| ] | |
| } else { | |
| public = [] | |
| } | |
| deps = [] | |
| deps += [ "//sdk/lib/stdcompat" ] | |
| if (is_fuchsia) { | |
| deps += [ | |
| "//sdk/lib/fidl", | |
| "//zircon/system/ulib/sync", | |
| ] | |
| } | |
| visibility = [ ":*" ] | |
| public_deps = [ ":vfs_headers" ] | |
| } | |
| static_library("cpp") { | |
| sources = [] | |
| sources += [ | |
| "debug.cc", | |
| "vfs.cc", | |
| "vfs_types.cc", | |
| "vnode.cc", | |
| ] | |
| if (is_fuchsia) { | |
| sources += [ | |
| "fuchsia_vfs.cc", | |
| "lazy_dir.cc", | |
| "managed_vfs.cc", | |
| "paged_vfs.cc", | |
| "paged_vnode.cc", | |
| "pager_thread_pool.cc", | |
| "pseudo_dir.cc", | |
| "pseudo_file.cc", | |
| "remote_dir.cc", | |
| "service.cc", | |
| "synchronous_vfs.cc", | |
| "vmo_file.cc", | |
| "watcher.cc", | |
| ] | |
| } | |
| deps = [] | |
| deps += [ "//sdk/lib/stdcompat" ] | |
| if (is_fuchsia) { | |
| deps += [ | |
| ":connection", | |
| "//sdk/lib/fidl", | |
| "//zircon/system/ulib/sync", | |
| ] | |
| } | |
| visibility = [ | |
| ":*", | |
| "//sdk/lib/component/tests:*", | |
| "//sdk/lib/device-watcher/cpp:*", | |
| "//sdk/lib/driver/compat/cpp:*", | |
| "//sdk/lib/driver/power/cpp:*", | |
| "//sdk/lib/ld/testing:*", | |
| "//sdk/lib/svc:*", | |
| "//sdk/lib/vfs/internal:*", | |
| "//src/bringup/bin/console-launcher:*", | |
| "//src/camera/bin/device_watcher:*", | |
| "//src/camera/lib/fake_logical_buffer_collection:*", | |
| "//src/connectivity/bluetooth/hci/vendor/broadcom:*", | |
| "//src/connectivity/bluetooth/hci/vendor/intel:*", | |
| "//src/developer/debug/debug_agent:*", | |
| "//src/developer/debug/debug_agent/testing:*", | |
| "//src/developer/vsock-sshd-host:*", | |
| "//src/devices/bin/driver_manager:*", | |
| "//src/devices/bin/driver_manager/devfs:*", | |
| "//src/devices/testing/devmgr-integration-test-shim:*", | |
| "//src/devices/testing/driver-integration-test-shim:*", | |
| "//src/devices/tests/v2/runtime-protocol:*", | |
| "//src/devices/thermal/bin/fan-controller:*", | |
| "//src/firmware/lib/fastboot/test:*", | |
| "//src/firmware/paver/test:*", | |
| "//src/graphics/bin/vulkan_loader:*", | |
| "//src/graphics/bin/vulkan_loader/test:*", | |
| "//src/graphics/drivers/msd-arm-mali/tests/unit_tests:*", | |
| "//src/lib/fsl:*", | |
| "//src/lib/zxdump:*", | |
| "//src/media/audio/audio_core:*", | |
| "//src/media/audio/services/device_registry:*", | |
| "//src/media/codec/factory:*", | |
| "//src/performance/memory/thrasher:*", | |
| "//src/storage/blobfs:*", | |
| "//src/storage/blobfs/bin:*", | |
| "//src/storage/conformance/conformance_harness/cppvfs:*", | |
| "//src/storage/conformance/conformance_harness/memfs:*", | |
| "//src/storage/conformance/conformance_harness/minfs:*", | |
| "//src/storage/f2fs:*", | |
| "//src/storage/fs_test:*", | |
| "//src/storage/lib:*", | |
| "//src/storage/lib/fs_management/cpp:*", | |
| "//src/storage/lib/watchdog:*", | |
| "//src/storage/memfs:*", | |
| "//src/storage/memfs/test:*", | |
| "//src/storage/minfs:*", | |
| "//src/storage/minfs/test:*", | |
| "//src/storage/minfs/tools:*", | |
| "//src/storage/testing:*", | |
| "//src/sys/component_manager/tests/rights:*", | |
| "//src/tests/microbenchmarks:*", | |
| "//src/virtualization/packages:*", | |
| "//zircon/system/ulib/debugdata:*", | |
| "//zircon/system/ulib/debugdata/test:*", | |
| "//zircon/system/ulib/runtests-utils:*", | |
| "//zircon/system/ulib/runtests-utils/test:*", | |
| "//zircon/system/ulib/svc:*", | |
| ] | |
| public_deps = [ ":vfs_headers" ] | |
| } |