| # 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/components.gni") |
| import("//build/test.gni") |
| import("//src/storage/fs_test/suite.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":disk-extractor-unit-test" ] |
| } |
| |
| test("disk_extractor_unit_test") { |
| testonly = true |
| sources = [ |
| "blobfs_extractor_test.cc", |
| "extractor_test.cc", |
| "hex_dump_generator_test.cc", |
| "minfs_extractor_test.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.fs", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/storage/blobfs/test/integration:blobfs_integration_fixtures", |
| "//src/storage/extractor/c:disk_extractor", |
| "//src/storage/extractor/cpp:disk_extractor", |
| "//src/storage/fs_test", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zxc", |
| "//zircon/third_party/ulib/cksum", |
| ] |
| data_deps = [ "//src/storage/bin/blobfs" ] |
| } |
| |
| fuchsia_component("disk-extractor-unit-test-component") { |
| testonly = true |
| manifest = "meta/cpp_lib_tests.cml" |
| deps = [ |
| ":disk_extractor_unit_test", |
| "//src/storage/bin/minfs", |
| "//src/storage/minfs/test:minfs_fs_test_config", |
| ] |
| } |
| |
| fuchsia_test_package("disk-extractor-unit-test") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| test_components = [ ":disk-extractor-unit-test-component" ] |
| } |
| |
| static_library("disk_extractor") { |
| public = [ |
| "extractor.h", |
| "hex_dump_generator.h", |
| ] |
| deps = [ |
| "//src/lib/storage/vfs/cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/third_party/ulib/cksum", |
| "//zircon/third_party/ulib/safemath:safemath", |
| ] |
| |
| sources = [ |
| "extractor.cc", |
| "hex_dump_generator.cc", |
| "minfs_extractor.cc", |
| ] |
| public_deps = [ |
| "//sdk/lib/fit-promise", |
| "//src/storage/blobfs", |
| "//src/storage/extractor/c:disk_extractor", |
| "//src/storage/minfs", |
| "//zircon/public/lib/zxc", |
| ] |
| if (is_fuchsia) { |
| sources += [ "blobfs_extractor.cc" ] |
| public_deps += [ |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/id_allocator", |
| "//zircon/system/ulib/syslog", |
| ] |
| deps += [ |
| "//sdk/lib/fdio", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| ] |
| include_dirs = [ ".." ] |
| } else { |
| sources += [ "blobfs_extractor_host.cc" ] |
| } |
| } |