| # Copyright 2021 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/component_manifest_resources.gni") |
| import("//build/test.gni") |
| import("//src/storage/testing/driver_test_realm.gni") |
| |
| # TODO(fxbug.dev/90698): Once everything launches blobfs as a component, rename this binary to |
| # blobfs and remove the old binary. |
| executable("blobfs-component") { |
| sources = [ "main.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel_llcpp", |
| "//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_llcpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/storage/blobfs", |
| "//src/storage/blobfs:decompressor-sandbox", |
| "//zircon/system/ulib/service:service-llcpp", |
| ] |
| |
| # 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" ] |
| } |
| |
| component_manifest_resources("meta") { |
| sources = [ "meta/blobfs.cml" ] |
| } |
| |
| test("blobfs_component_test") { |
| sources = [ "blobfs_test.cc" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_llcpp", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_llcpp", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/storage/fidl/fuchsia.fs.startup:fuchsia.fs.startup_llcpp", |
| "//src/storage/testing:storage_driver_test_support", |
| "//zircon/system/ulib/async-loop", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/service:service-llcpp", |
| ] |
| } |
| |
| fuchsia_component("blobfs-component-test-component") { |
| testonly = true |
| manifest = "meta/blobfs_component_test.cml" |
| deps = [ |
| ":blobfs_component_test", |
| "//src/storage/testing:storage_driver_test_realm", |
| ] |
| } |
| |
| fuchsia_test_package("blobfs-component-tests") { |
| test_components = [ ":blobfs-component-test-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":blobfs-component-tests" ] |
| } |
| |
| group("bootfs") { |
| deps = [ |
| ":blobfs-component", |
| ":meta", |
| ] |
| } |