| # 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/bind/bind.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//build/test/test_package.gni") |
| |
| driver_module("skip-block") { |
| deps = [ |
| ":common", |
| "//src/devices/lib/driver", |
| ] |
| } |
| |
| bind_rules("skip-block-bind") { |
| rules = "skip-block.bind" |
| output = "skip-block-bind.h" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.nand" ] |
| } |
| |
| source_set("common") { |
| sources = [ |
| "logical-to-physical-map.cc", |
| "skip-block.cc", |
| ] |
| deps = [ |
| ":skip-block-bind", |
| "//sdk/fidl/fuchsia.hardware.nand:fuchsia.hardware.nand_c", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/fzl", |
| ] |
| public_deps = [ |
| "//sdk/banjo/ddk.protocol.badblock", |
| "//sdk/banjo/ddk.protocol.nand", |
| "//sdk/fidl/fuchsia.hardware.skipblock:fuchsia.hardware.skipblock_llcpp", |
| "//src/devices/lib/dev-operation", |
| "//src/lib/ddk", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zircon-internal", |
| ] |
| } |
| |
| test("skip-block-test") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "skip-block-test" |
| sources = [ |
| "test/logical-to-physical-map-test.cc", |
| "test/skip-block-test.cc", |
| ] |
| include_dirs = [ "." ] |
| deps = [ |
| ":common", |
| "//sdk/fidl/fuchsia.hardware.nand:fuchsia.hardware.nand_c", |
| "//sdk/lib/fdio", |
| "//src/devices/testing/fake_ddk", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/fzl", |
| ] |
| } |
| |
| unittest_package("skip-block-test-package") { |
| package_name = "skip-block-test" |
| deps = [ ":skip-block-test" ] |
| |
| tests = [ |
| { |
| name = "skip-block-test" |
| environments = basic_envs |
| }, |
| ] |
| } |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":skip-block-bind_test", |
| ":skip-block-test-package", |
| ] |
| } |