blob: 4876e4018970f4e30e2daa3732640fd9c37d03d4 [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-test") {
sources = [ "memfs-tests.cc" ]
deps = [
"//sdk/lib/fdio",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/predicates",
"//src/storage/lib/vfs/cpp",
"//src/storage/memfs:lib",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/sync",
]
}
fuchsia_unittest_package("memfs-tests") {
deps = [ ":memfs-test" ]
}
shared_library("memfs_fs_test") {
testonly = true
sources = [ "memfs_fs_test.cc" ]
deps = [
"//src/storage/fs_test",
"//src/storage/memfs:lib",
"//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",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp",
"//sdk/lib/component/incoming/cpp",
"//sdk/lib/fdio",
"//src/storage/lib/vfs/cpp",
"//src/storage/memfs:cpp",
"//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" ]
test_type = "system"
}
group("tests") {
testonly = true
deps = [
":memfs-fs-tests",
":memfs-legacy-tests",
":memfs-slow-fs-tests",
":memfs-tests",
]
}