| # 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/unification/zx_library.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":virtio", |
| ":virtio-backend-test-package", |
| ] |
| } |
| |
| test("virtio-backend-test") { |
| sources = [ "backend_tests.cc" ] |
| deps = [ |
| ":virtio", |
| "//src/devices/pci/testing:pci-protocol-fake", |
| "//src/devices/testing/fake_ddk", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("virtio-backend-test-package") { |
| component_name = "virtio-backend-test" |
| deps = [ ":virtio-backend-test" ] |
| } |
| |
| zx_library("virtio") { |
| sdk = "static" |
| sdk_headers = [ |
| "lib/virtio/driver_utils.h", |
| "lib/virtio/device.h", |
| "lib/virtio/ring.h", |
| "lib/virtio/backends/fake.h", |
| "lib/virtio/backends/pci.h", |
| ] |
| |
| configs += [ "//build/config:all_source" ] |
| sources = [ |
| "backends/pci.cc", |
| "backends/pci_legacy.cc", |
| "backends/pci_modern.cc", |
| "device.cc", |
| "driver_utils.cc", |
| "ring.cc", |
| ] |
| public_deps = [ |
| "//sdk/banjo/fuchsia.hardware.pci", |
| "//src/devices/lib/mmio", |
| "//src/devices/pci/lib/device-protocol-pci", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/pretty", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxc", |
| "//zircon/system/ulib/hid", |
| "//zircon/system/ulib/virtio", |
| ] |
| } |