| # 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/host.gni") |
| |
| source_set("raw-nand-options") { |
| public = [ "options.h" ] |
| } |
| |
| source_set("raw-nand-image-utils") { |
| public = [ "raw_nand_image_utils.h" ] |
| public_deps = [ |
| ":raw-nand-options", |
| "//src/storage/volume_image/utils:io-interfaces", |
| ] |
| deps = [ |
| "//sdk/lib/fit-promise", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| source_set("ftl-image-internal") { |
| sources = [ "ftl_image_internal.cc" ] |
| public = [ "ftl_image_internal.h" ] |
| public_deps = [ |
| "//sdk/lib/fit-promise", |
| "//zircon/system/ulib/fbl", |
| ] |
| deps = [ |
| ":raw-nand-image-utils", |
| "//zircon/third_party/ulib/safemath", |
| ] |
| } |
| |
| source_set("ftl-io") { |
| sources = [ "ftl_io.cc" ] |
| public = [ "ftl_io.h" ] |
| public_deps = [ |
| "//sdk/lib/fit-promise", |
| "//src/storage/volume_image/utils:io-interfaces", |
| "//zircon/system/ulib/ftl", |
| ] |
| deps = [ |
| ":raw-nand-image-utils", |
| "//zircon/system/ulib/fbl", |
| "//zircon/third_party/ulib/safemath", |
| ] |
| } |
| |
| source_set("ftl-raw-nand-image-writer") { |
| sources = [ "ftl_raw_nand_image_writer.cc" ] |
| public = [ "ftl_raw_nand_image_writer.h" ] |
| public_deps = [ |
| ":raw-nand-options", |
| "//sdk/lib/fit-promise", |
| "//src/storage/volume_image/utils:io-interfaces", |
| "//zircon/system/ulib/fbl", |
| ] |
| deps = [ |
| ":ftl-image-internal", |
| ":raw-nand-image-utils", |
| "//zircon/third_party/ulib/safemath", |
| ] |
| } |
| |
| source_set("ftl-image") { |
| sources = [ "ftl_image.cc" ] |
| public = [ "ftl_image.h" ] |
| public_deps = [ |
| ":raw-nand-options", |
| "//sdk/lib/fit-promise", |
| "//src/storage/volume_image:partition", |
| "//src/storage/volume_image/utils:io-interfaces", |
| ] |
| deps = [ |
| ":ftl-image-internal", |
| ":raw-nand-image-utils", |
| "//src/storage/volume_image/utils:block-utils", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| source_set("ftl-test-helper") { |
| testonly = true |
| sources = [ "ftl_test_helper.cc" ] |
| public = [ "ftl_test_helper.h" ] |
| |
| public_deps = [ |
| ":raw-nand-options", |
| "//zircon/system/ulib/ftl", |
| ] |
| |
| deps = [ "//zircon/system/ulib/fbl" ] |
| } |
| |
| source_set("ftl-test") { |
| testonly = true |
| sources = [ |
| "ftl_image_internal_test.cc", |
| "ftl_image_test.cc", |
| "ftl_io_test.cc", |
| "ftl_raw_nand_image_writer_test.cc", |
| "raw_nand_image_utils_test.cc", |
| ] |
| |
| deps = [ |
| ":ftl-image", |
| ":ftl-image-internal", |
| ":ftl-io", |
| ":ftl-raw-nand-image-writer", |
| ":ftl-test-helper", |
| ":raw-nand-image-utils", |
| "//src/storage/volume_image/utils:block-utils", |
| "//src/storage/volume_image/utils:fd-io", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| ] |
| } |
| |
| executable("ftl-volume-extractor") { |
| output_name = "ftl-volume-extractor" |
| sources = [ "ftl_volume_extractor.cc" ] |
| deps = [ |
| "//src/devices/block/drivers/ftl/tests:shared", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/ftl:ftl", |
| "//zircon/system/ulib/zxc:zxc", |
| ] |
| } |
| |
| install_host_tools("ftl-volume-extractor-host") { |
| deps = [ ":ftl-volume-extractor" ] |
| outputs = [ "ftl-volume-extractor" ] |
| } |
| |
| executable("nandoob-converter") { |
| output_name = "nandoob-converter" |
| sources = [ "nandoob_converter.c" ] |
| } |
| |
| install_host_tools("nandoob-converter-host") { |
| deps = [ ":nandoob-converter" ] |
| outputs = [ "nandoob-converter" ] |
| } |
| |
| source_set("ftl-integration-test") { |
| testonly = true |
| sources = [ "ftl_image_integration_test.cc" ] |
| |
| deps = [ |
| ":ftl-image", |
| ":ftl-image-internal", |
| ":ftl-raw-nand-image-writer", |
| ":ftl-test-helper", |
| ":raw-nand-image-utils", |
| "//src/storage/volume_image/utils:block-utils", |
| "//src/storage/volume_image/utils:fd-io", |
| "//third_party/googletest:gmock", |
| "//third_party/googletest:gtest", |
| "//zircon/system/ulib/ftl", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ftl-test" ] |
| } |
| |
| group("integration-tests") { |
| testonly = true |
| deps = [ ":ftl-integration-test" ] |
| } |