blob: 90b97a844bb8f6914acc6365a7d4eeba97bba640 [file]
# Copyright 2021 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("//src/devices/bus/drivers/pci/pci.gni")
group("tests") {
testonly = true
deps = []
if (target_cpu == "x64") {
deps += [ ":x86-acpi-tests" ]
}
}
shared_public_deps = [
"//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_llcpp",
"//sdk/fidl/fuchsia.hardware.spi:fuchsia.hardware.spi_llcpp",
"//src/devices/bind/fuchsia.acpi:bind.fuchsia.acpi",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/svc",
]
shared_deps = [
"//sdk/banjo/fuchsia.hardware.pciroot:fuchsia.hardware.pciroot_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp",
"//sdk/fidl/fuchsia.hardware.acpi:fuchsia.hardware.acpi_llcpp",
"//src/devices/lib/acpi",
"//src/devices/lib/iommu",
"//src/lib/ddk:ddk-deprecated-binding-headers",
"//third_party/acpica",
"//zircon/system/ulib/fbl",
"//zircon/system/ulib/fidl-async:fidl-async-cpp",
"//zircon/system/ulib/zircon-internal",
"//zircon/system/ulib/zxc",
]
source_set("acpi") {
sources = [
"acpi-impl.cc",
"acpi.cc",
"device-builder.cc",
"device.cc",
"event.cc",
"fidl.cc",
"global-lock.cc",
"manager.cc",
"resources.cc",
]
public_deps = shared_public_deps
deps = shared_deps + [ "//src/lib/ddk" ]
# TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated,
# rather than builders.
configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ]
}
test("acpi-test") {
sources = [
"acpi.cc",
"device-builder.cc",
"device-test.cc",
"device.cc",
"event.cc",
"fidl-test.cc",
"fidl.cc",
"global-lock.cc",
"manager-test.cc",
"manager.cc",
"resources.cc",
"status-test.cc",
"util-test.cc",
]
deps = shared_deps + shared_public_deps + [
"//zircon/system/ulib/zxtest",
"//src/devices/testing/mock-ddk",
"//src/devices/testing/fake-resource",
"test:mock-acpi",
]
defines = [ "IS_TEST" ]
# TODO(fxbug.dev/94768): This target uses mutable tables which are deprecated,
# rather than builders.
configs += [ "//build/cpp:fidl-wire-deprecated-mutable-tables" ]
}
fuchsia_unittest_package("x86-acpi-tests") {
deps = [ ":acpi-test" ]
}