| # 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/dist/packaged_shared_library.gni") |
| import("//build/test.gni") |
| import("//src/storage/fs_test/suite.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":memfs-fs-tests", |
| ":memfs-inotify-test", |
| ":memfs-inotify-test-pkg", |
| ":memfs-slow-fs-tests", |
| ":memfs-tests", |
| ] |
| } |
| |
| test("memfs-inotify-test") { |
| sources = [ "memfs-inotify-tests.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//sdk/lib/fdio", |
| "//src/lib/fxl", |
| "//src/lib/storage/vfs/cpp:inotify_test_base", |
| "//src/storage/memfs", |
| "//src/storage/memfs:lib", |
| "//zircon/system/ulib/async-loop", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fidl", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| test("memfs-test") { |
| sources = [ "memfs-tests.cc" ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//src/lib/storage/vfs/cpp", |
| "//src/storage/memfs", |
| "//src/storage/memfs:lib", |
| "//zircon/system/ulib/async", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-default", |
| "//zircon/system/ulib/async-loop", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("memfs-inotify-test-pkg") { |
| package_name = "memfs-inotify-test" |
| deps = [ ":memfs-inotify-test" ] |
| } |
| |
| fuchsia_unittest_package("memfs-tests") { |
| deps = [ ":memfs-test" ] |
| } |
| |
| shared_library("memfs_fs_test") { |
| testonly = true |
| sources = [ |
| "memfs_fs_test.cc", |
| "memfs_fs_test.h", |
| ] |
| deps = [ |
| "//src/storage/fs_test", |
| "//src/storage/memfs", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| ] |
| |
| # TODO(fxbug.dev/95833): This target uses the deprecated C bindings. |
| # Consider switching to the C++ bindings. See linked bug for details. |
| configs += [ "//build/c:fidl-deprecated-c-bindings" ] |
| } |
| |
| packaged_shared_library("memfs_fs_test_as_module") { |
| testonly = true |
| library = ":memfs_fs_test" |
| } |
| |
| fs_test_config("memfs") { |
| data_deps = [ ":memfs_fs_test_as_module" ] |
| library = "libmemfs_fs_test.so" |
| } |
| |
| fs_test_suite("memfs") { |
| deps = [ ":memfs_fs_test_config" ] |
| } |
| |
| slow_fs_test_suite("memfs") { |
| deps = [ ":memfs_fs_test_config" ] |
| } |