blob: a79343e9969340351360c8334bc6d1969f2dde54 [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/dist/packaged_shared_library.gni")
import("//build/test.gni")
import("//src/storage/fs_test/suite.gni")
test("memfs-inotify-test") {
sources = [ "memfs-inotify-tests.cc" ]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp_wire",
"//sdk/lib/fdio",
"//sdk/lib/fidl",
"//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/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",
]
}
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" ]
}
test("memfs-legacy-test") {
output_name = "memfs-legacy-test"
sources = [
"fidl-tests.cc",
"vmofile-tests.cc",
]
deps = [
"//sdk/fidl/fuchsia.io:fuchsia.io_cpp_wire",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp_wire",
"//sdk/lib/component/incoming/cpp",
"//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/fbl",
"//zircon/system/ulib/fdio-caller",
"//zircon/system/ulib/fzl",
"//zircon/system/ulib/sync",
"//zircon/system/ulib/trace-engine",
"//zircon/system/ulib/zx",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("memfs-legacy-tests") {
manifest = "meta/zircon-memfs-test.cml"
deps = [ ":memfs-legacy-test" ]
}
executable("memfs-component-test") {
testonly = true
sources = [ "component-tests.cc" ]
deps = [
"//sdk/lib/sys/component/cpp/testing:cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gtest",
]
}
fuchsia_unittest_package("memfs-component-tests") {
manifest = "meta/memfs-component-tests.cml"
deps = [
":memfs-component-test",
"//src/storage/memfs:memfs_component",
]
}
group("tests") {
testonly = true
deps = [
":memfs-component-tests",
":memfs-fs-tests",
":memfs-inotify-test",
":memfs-inotify-test-pkg",
":memfs-legacy-tests",
":memfs-slow-fs-tests",
":memfs-tests",
]
}