| # 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/zx_library.gni") |
| import("//src/sys/build/components.gni") |
| |
| zx_library("pci") { |
| sdk = "source" |
| sdk_headers = [ |
| "lib/pci/pio.h", |
| "lib/pci/pciroot.h", |
| "lib/pci/root_host.h", |
| ] |
| sources = [ |
| "pio.cc", |
| "root_host.cc", |
| ] |
| deps = [ |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxc", |
| ] |
| |
| public_deps = [ |
| "//sdk/banjo/ddk.protocol.pciroot", |
| "//zircon/system/ulib/region-alloc", |
| ] |
| |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| } |
| |
| test("pci-roothost") { |
| sources = [ "root_host-test.cc" ] |
| |
| deps = [ |
| ":pci", |
| "//sdk/banjo/ddk.protocol.pciroot", |
| "//src/devices/testing/fake-msi", |
| "//src/devices/testing/fake-resource", |
| "//src/devices/testing/no_ddk", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/region-alloc", |
| ] |
| } |
| |
| fuchsia_unittest_package("pci-roothost-test") { |
| executable_path = "test/pci-roothost" |
| deps = [ ":pci-roothost" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":pci-roothost-test" ] |
| } |