| # 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/fuzzing/fuzzer.gni") |
| import("//build/test.gni") |
| |
| test("test") { |
| if (is_fuchsia) { |
| fdio_config = [ "//build/config/fuchsia:fdio_config" ] |
| if (configs + fdio_config - fdio_config != configs) { |
| configs -= fdio_config |
| } |
| } |
| output_name = "paver-test" |
| sources = [ |
| "abr-test.cc", |
| "data-sink-test.cc", |
| "device-partitioner-test.cc", |
| "flashmap-client-test.cc", |
| "fvm-test.cc", |
| "main.cc", |
| "partition-client-test.cc", |
| "paver-context-test.cc", |
| "paversvc-test.cc", |
| "stream-reader-test.cc", |
| "test-utils.cc", |
| "validation-test.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.acpi.chromeos:fuchsia.acpi.chromeos_llcpp_testing", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_llcpp", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_llcpp", |
| "//sdk/fidl/fuchsia.fshost:fuchsia.fshost_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.skipblock:fuchsia.hardware.skipblock_llcpp", |
| "//sdk/fidl/fuchsia.nand.flashmap:fuchsia.nand.flashmap_llcpp", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_llcpp", |
| "//sdk/fidl/fuchsia.tpm.cr50:fuchsia.tpm.cr50_llcpp", |
| "//sdk/fidl/fuchsia.vboot:fuchsia.vboot_llcpp", |
| "//src/devices/lib/amlogic", |
| "//src/firmware/lib/abr", |
| "//src/lib/storage/block_client/cpp", |
| "//src/lib/storage/fs_management", |
| "//src/lib/storage/ramdevice_client/cpp:ramdevice-client-test", |
| "//src/lib/storage/vfs/cpp", |
| "//src/lib/uuid", |
| "//src/storage/fshost:headers", |
| "//src/storage/fvm", |
| "//src/storage/gpt", |
| "//src/storage/lib/paver", |
| "//src/storage/lib/utils:topological_path", |
| "//zircon/system/ulib/async", |
| "//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/fidl-async:fidl-async-cpp", |
| "//zircon/system/ulib/fidl-utils", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/mock-boot-arguments", |
| "//zircon/system/ulib/service:service-llcpp", |
| "//zircon/system/ulib/svc", |
| "//zircon/system/ulib/sysconfig-client:sysconfig-sync-client", |
| "//zircon/system/ulib/zxc", |
| "//zircon/system/ulib/zxtest", |
| "//zircon/third_party/ulib/cksum", |
| ] |
| |
| # 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(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" ] |
| } |
| |
| fuchsia_unittest_package("paver-test") { |
| deps = [ |
| ":test", |
| "//src/devices/block/drivers/core", |
| "//src/devices/block/drivers/ftl", |
| "//src/devices/block/drivers/gpt", |
| "//src/devices/block/drivers/mbr", |
| "//src/devices/block/drivers/ramdisk", |
| "//src/devices/board/drivers/integration-test", |
| "//src/devices/bus/drivers/platform", |
| "//src/devices/nand/drivers/nand", |
| "//src/devices/nand/drivers/nandpart", |
| "//src/devices/nand/drivers/ram-nand", |
| "//src/devices/nand/drivers/skip-block", |
| "//src/storage/fvm/driver", |
| ] |
| test_specs = { |
| # Gives more timeout to reduce flake.(https://fxbug.dev/99735) |
| timeout_secs = 720 |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuzzer("paver-validation-fuzzer") { |
| sources = [ "validation-fuzzer.cc" ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_llcpp", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_llcpp", |
| "//sdk/fidl/fuchsia.fshost:fuchsia.fshost_llcpp", |
| "//sdk/fidl/fuchsia.hardware.block:fuchsia.hardware.block_llcpp", |
| "//sdk/fidl/fuchsia.hardware.skipblock:fuchsia.hardware.skipblock_llcpp", |
| "//sdk/fidl/fuchsia.paver:fuchsia.paver_llcpp", |
| "//src/lib/storage/block_client/cpp", |
| "//src/storage/gpt", |
| "//src/storage/lib/paver:paver-core", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fdio-caller", |
| "//zircon/system/ulib/svc", |
| "//zircon/system/ulib/sysconfig-client:sysconfig-sync-client", |
| "//zircon/system/ulib/zxc", |
| ] |
| |
| include_dirs = [ |
| "//src/storage/lib/paver", |
| "..", |
| ] |
| } |
| |
| fuzzers_package("paver-fuzzers") { |
| fuzzers = [ ":paver-validation-fuzzer" ] |
| } |