| # 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/test.gni") |
| import("//build/unification/images/migrated_manifest.gni") |
| |
| group("test") { |
| testonly = true |
| deps = [ ":nand-unittest" ] |
| } |
| |
| test("nand-unittest") { |
| # Dependent manifests unfortunately cannot be marked as `testonly`. |
| # Remove when converting this file to proper GN build idioms. |
| testonly = false |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "nand-test.cc" ] |
| include_dirs = [ ".." ] |
| deps = [ |
| ":common", |
| "//sdk/banjo/ddk.protocol.nand", |
| "//sdk/banjo/ddk.protocol.rawnand", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/ddktl", |
| "//zircon/public/lib/dev-operation", |
| "//zircon/public/lib/fake_ddk", |
| "//zircon/public/lib/fzl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| # TODO(mcgrathr): This really should be in ..:common and actually shared |
| # with the driver(). But that requires moving the #ifndef TEST code out |
| # of ../nand.cpp into a file only built into the driver and not "common". |
| source_set("common") { |
| defines = [ |
| "TEST", |
| "_ALL_SOURCE", |
| ] |
| include_dirs = [ ".." ] |
| sources = [ "../nand.cc" ] |
| deps = [ |
| "//sdk/banjo/ddk.protocol.nand", |
| "//sdk/banjo/ddk.protocol.rawnand", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/ddktl", |
| "//zircon/public/lib/dev-operation", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fzl", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/banjo/ddk.protocol.platform.device", |
| "//zircon/system/fidl/fuchsia-hardware-nand:c", |
| ] |
| } |
| |
| migrated_manifest("nand-unittest-manifest") { |
| deps = [ ":nand-unittest" ] |
| } |