blob: 157173d1afa35d9f7825c5f89ac689c86710f874 [file] [log] [blame]
# 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")
zx_library("pci") {
sdk = "source"
sdk_headers = [
"lib/pci/hw.h",
"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/system/ulib/fbl",
"//zircon/system/ulib/hwreg",
"//zircon/system/ulib/zx",
]
public_deps = [
"//sdk/banjo/fuchsia.hardware.pciroot:fuchsia.hardware.pciroot_banjo_cpp",
"//zircon/system/ulib/inspect",
"//zircon/system/ulib/region-alloc",
]
configs += [ "//build/config/fuchsia:static_cpp_standard_library" ]
}
test("pci-roothost") {
sources = [
"pciroot-test.cc",
"root_host-test.cc",
]
deps = [
":pci",
"//sdk/banjo/fuchsia.hardware.pciroot:fuchsia.hardware.pciroot_banjo_cpp",
"//sdk/lib/inspect/testing/cpp:zxtest",
"//src/devices/testing/fake-msi",
"//src/devices/testing/fake-resource",
"//src/devices/testing/mock-ddk",
"//zircon/system/ulib/inspect",
"//zircon/system/ulib/region-alloc",
"//zircon/system/ulib/zxtest",
]
}
fuchsia_unittest_package("pci-roothost-test") {
deps = [ ":pci-roothost" ]
}
group("tests") {
testonly = true
deps = [ ":pci-roothost-test" ]
}