| # 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/components.gni") |
| import("//build/test.gni") |
| import("//build/zircon/zx_library.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":mmio-unittest-package" ] |
| } |
| |
| zx_library("mmio") { |
| sdk = "source" |
| sdk_publishable = "experimental" |
| sdk_headers = [ |
| "lib/mmio/mmio.h", |
| "lib/mmio/mmio-buffer.h", |
| "lib/mmio/mmio-internal.h", |
| "lib/mmio/mmio-pinned-buffer.h", |
| "lib/mmio/mmio-view.h", |
| ] |
| sources = [ "mmio-buffer.cc" ] |
| public_deps = [ |
| # <lib/mmio/mmio.h> has #include <lib/mmio-ptr/mmio-ptr.h>. |
| "//zircon/system/ulib/mmio-ptr", |
| |
| # <lib/mmio/mmio.h> has #include <lib/zx/bti.h>. |
| "//zircon/system/ulib/zx", |
| |
| # <lib/mmio/mmio-buffer.h> has #include <lib/zx/status.h>. |
| "//zircon/system/ulib/zxc", |
| ] |
| } |
| |
| test("mmio-unittest") { |
| sources = [ "mmio-buffer-test.cc" ] |
| deps = [ |
| ":mmio", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("mmio-unittest-package") { |
| package_name = "mmio-unittest" |
| deps = [ ":mmio-unittest" ] |
| } |