| # 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/test.gni") |
| import("//src/storage/testing/driver_test_realm.gni") |
| |
| config("headers_config") { |
| include_dirs = [ "include" ] |
| } |
| |
| if (is_fuchsia) { |
| shared_library("fs-management") { |
| public_configs = [ ":headers_config" ] |
| public = [ |
| "include/fs-management/admin.h", |
| "include/fs-management/format.h", |
| "include/fs-management/fvm.h", |
| "include/fs-management/launch.h", |
| "include/fs-management/mount.h", |
| ] |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "admin.cc", |
| "format.cc", |
| "fsck.cc", |
| "fvm.cc", |
| "launch.cc", |
| "mkfs.cc", |
| "mount.cc", |
| "path.cc", |
| ] |
| public_deps = [ "//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_c" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_llcpp", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_c", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_llcpp", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition_c", |
| "//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_c", |
| "//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_llcpp", |
| "//src/lib/digest", |
| "//src/lib/storage/vfs/cpp", |
| "//src/storage/fvm", |
| "//src/storage/gpt", |
| "//third_party/boringssl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fdio-caller", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/pretty", |
| "//zircon/system/ulib/zx", |
| "//zircon/system/ulib/zxc", |
| ] |
| |
| # TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated. |
| # Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>). |
| # See linked bug for details. |
| configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ] |
| |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| } else { |
| source_set("fs-management") { |
| public = [ |
| "include/fs-management/format.h", |
| "include/fs-management/fvm.h", |
| "include/fs-management/launch.h", |
| ] |
| |
| public_configs = [ ":headers_config" ] |
| |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| } |
| |
| test("fs-management-test") { |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "admin_test.cc", |
| "format_test.cc", |
| "fvm.cc", |
| "fvm_test.cc", |
| "mount_test.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device_llcpp", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_llcpp", |
| "//sdk/fidl/fuchsia.hardware.block.partition:fuchsia.hardware.block.partition_llcpp", |
| "//sdk/fidl/fuchsia.hardware.block.volume:fuchsia.hardware.block.volume_llcpp", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//sdk/lib/fdio", |
| "//src/lib/digest", |
| "//src/lib/fxl/test:test_settings", |
| "//src/lib/storage/fs_management", |
| "//src/lib/storage/vfs/cpp", |
| "//src/storage/fvm", |
| "//src/storage/gpt", |
| "//src/storage/memfs", |
| "//src/storage/memfs:memfs-cpp", |
| "//src/storage/testing:storage_driver_test_realm", |
| "//src/storage/testing:storage_driver_test_support", |
| "//third_party/googletest:gtest", |
| "//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", |
| "//zircon/system/ulib/trace-engine", |
| "//zircon/system/ulib/zx", |
| ] |
| data_deps = [ |
| "//src/storage/bin/blobfs", |
| "//src/storage/bin/minfs", |
| "//zircon/third_party/uapp/fsck-msdosfs", |
| "//zircon/third_party/uapp/mkfs-msdosfs", |
| ] |
| |
| # TODO(https://fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| |
| # TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated. |
| # Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>). |
| # See linked bug for details. |
| configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ] |
| } |
| |
| fuchsia_component("fs-management-test-component") { |
| testonly = true |
| manifest = "meta/fs_management_tests.cml" |
| deps = [ ":fs-management-test" ] |
| } |
| |
| fuchsia_test_package("fs-management-tests") { |
| test_components = [ ":fs-management-test-component" ] |
| test_specs = { |
| log_settings = { |
| # Required due to no access to Cobalt for minfs |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":fs-management-tests" ] |
| } |