blob: c7e4cba1ab0b73064e5e22c006038b0877f3c9f9 [file] [log] [blame]
# Copyright 2022 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/test.gni")
import("//src/storage/testing/driver_test_realm.gni")
source_set("start-storage-benchmark-lib") {
testonly = true
public = [
"block-device.h",
"command-line-options.h",
"memfs.h",
"running-filesystem.h",
]
sources = [
"block-device.cc",
"command-line-options.cc",
"memfs.cc",
]
public_deps = [
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_llcpp",
"//sdk/fidl/fuchsia.io:fuchsia.io_llcpp",
"//sdk/fidl/fuchsia.sys:fuchsia.sys_llcpp",
"//src/lib/fxl",
"//src/lib/storage/fs_management",
"//src/storage/memfs:cpp",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/cmdline",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/zxc",
]
deps = [
"//sdk/lib/fdio",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/uuid",
"//src/security/zxcrypt:zxcrypt-client",
"//src/storage/fs_test:crypt_service",
"//src/storage/fxfs:fuchsia.fxfs_llcpp",
"//src/storage/lib/utils:topological_path",
"//zircon/system/public",
"//zircon/system/ulib/service:service-llcpp",
]
data_deps = [
"//src/security/policy/zxcrypt:null",
"//src/storage/bin/f2fs",
"//src/storage/bin/minfs",
"//src/storage/fxfs",
"//src/storage/fxfs-crypt:fxfs_crypt",
]
}
executable("start-storage-benchmark-bin") {
testonly = true
output_name = "start-storage-benchmark"
sources = [ "main.cc" ]
deps = [
":start-storage-benchmark-lib",
"//sdk/fidl/fuchsia.io:fuchsia.io_llcpp",
"//src/lib/fxl/test:test_settings",
"//src/storage/bin/odu:libodu",
"//zircon/system/ulib/service:service-llcpp",
"//zircon/system/ulib/zxc",
]
}
fuchsia_component("start-storage-benchmark-component") {
testonly = true
component_name = "start-storage-benchmark"
manifest = "meta/start-storage-benchmark.cml"
deps = [ ":start-storage-benchmark-bin" ]
}
fuchsia_package("start-storage-benchmark") {
testonly = true
deps = [
":start-storage-benchmark-component",
"//src/storage/fxfs:fxfs_component",
]
}
test("start-storage-benchmark-unittests") {
testonly = true
sources = [
"block-device-test.cc",
"command-line-options-test.cc",
"memfs-test.cc",
]
deps = [
":start-storage-benchmark-lib",
"//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_llcpp",
"//sdk/lib/sys/cpp",
"//sdk/lib/syslog/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/predicates",
"//src/storage/testing:storage_driver_test_realm",
"//src/storage/testing:storage_driver_test_support",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//zircon/system/ulib/service:service-llcpp",
]
}
expect_includes("fxfs_manifest_shard") {
includes = [ "//src/storage/fxfs/meta/test_fxfs.shard.cml" ]
}
storage_driver_test_realm_v2_component(
"start-storage-benchmark-tests-component") {
component_name = "start-storage-benchmark-tests"
deps = [
":fxfs_manifest_shard",
":start-storage-benchmark-unittests",
"//src/storage/fxfs:fxfs_component",
]
}
fuchsia_test_package("start-storage-benchmark-tests") {
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
test_components = [ ":start-storage-benchmark-tests-component" ]
}
group("tests") {
testonly = true
deps = [ ":start-storage-benchmark-tests" ]
}