blob: 139fd0d0dc5eb384223c96183ac2f3c45e8c1a61 [file] [log] [blame]
# Copyright 2020 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/test.gni")
import("//src/sys/build/fuchsia_test_package.gni")
import("//src/sys/build/fuchsia_unittest_component.gni")
source_set("factoryfs") {
sources = [
"directory.cc",
"directory_entry.cc",
"factoryfs.cc",
"file.cc",
"format.cc",
"fsck.cc",
"mount.cc",
"query.cc",
"runner.cc",
"superblock.cc",
]
public_deps = [
"//zircon/public/lib/bitmap",
"//zircon/public/lib/zxc",
"//zircon/system/ulib/fs",
"//zircon/system/ulib/fs/transaction",
"//zircon/system/ulib/storage/buffer",
]
deps = [
"//sdk/fidl/fuchsia.fs:fuchsia.fs_llcpp",
"//sdk/fidl/fuchsia.io:fuchsia.io_llcpp",
"//sdk/lib/fdio",
"//sdk/lib/syslog/cpp",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxc",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/block-client",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
"//zircon/system/ulib/fs",
"//zircon/system/ulib/trace",
"//zircon/system/ulib/trace-engine",
"//zircon/system/ulib/trace-provider:trace-provider-with-fdio",
]
}
test("factoryfs_unit") {
testonly = true
sources = [
"create_tests.cc",
"format_test.cc",
"fsck_test.cc",
"utils.cc",
]
deps = [
":factoryfs",
"//zircon/public/lib/safemath",
"//zircon/public/lib/sync",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/block-client:fake-device",
"//zircon/system/ulib/fidl-utils",
"//zircon/system/ulib/fs-management",
"//zircon/system/ulib/fs-test-utils",
"//zircon/system/ulib/storage/buffer",
"//zircon/system/ulib/storage/operation",
]
}
fuchsia_unittest_component("factoryfs-unit") {
executable_path = "test/factoryfs_unit"
deps = [ ":factoryfs_unit" ]
}
test("integration_test") {
sources = [ "integration_test.cc" ]
deps = [
"//src/lib/fxl/test:gtest_main",
"//src/lib/isolated_devmgr/v2_component:client",
"//third_party/googletest:gtest",
"//zircon/system/ulib/fs-management",
]
}
fuchsia_component("factoryfs-integration-test") {
testonly = true
manifest = "meta/factory_integration_tests.cml"
deps = [
":integration_test",
"//src/storage/bin/factoryfs",
"//src/storage/factory/export_ffs:bin",
]
}
fuchsia_test_package("factoryfs-tests") {
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
test_components = [
":factoryfs-unit",
":factoryfs-integration-test",
]
}
group("tests") {
testonly = true
deps = [ ":factoryfs-tests" ]
}