| # 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/bind/bind.gni") |
| import("//build/components.gni") |
| import("//build/drivers.gni") |
| import("//build/test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":intel-thermal-tests" ] |
| } |
| |
| driver_bind_rules("bind") { |
| rules = "intel_thermal.bind" |
| bind_output = "intel_thermal.bindbc" |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.interrupt:fuchsia.hardware.interrupt_bindlib", |
| "//sdk/fidl/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_bindlib", |
| "//src/devices/bind/fuchsia.acpi", |
| ] |
| } |
| |
| common_deps = [ |
| ":bind", |
| "//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_cpp", |
| "//sdk/lib/driver/runtime:driver_runtime_cpp", |
| "//src/devices/lib/acpi", |
| "//src/devices/lib/driver:driver_runtime", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/inspect", |
| "//zircon/system/ulib/zx", |
| ] |
| |
| fuchsia_driver("driver") { |
| output_name = "intel-thermal" |
| sources = [ "intel_thermal.cc" ] |
| deps = common_deps + [ "//src/devices/lib/driver" ] |
| } |
| |
| fuchsia_driver_component("component") { |
| component_name = "intel-thermal" |
| deps = [ ":driver" ] |
| info = "component-info.json" |
| manifest = "meta/intel-thermal.cml" |
| } |
| |
| fuchsia_driver_package("intel-thermal") { |
| driver_components = [ ":component" ] |
| } |
| |
| test("intel-thermal-unit-tests") { |
| sources = [ |
| "intel_thermal.cc", |
| "intel_thermal.h", |
| "unit-tests.cc", |
| ] |
| deps = common_deps + [ |
| "//sdk/lib/inspect/testing/cpp:zxtest", |
| "//src/devices/lib/acpi/mock:mock-acpi", |
| "//src/devices/testing/mock-ddk", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/zxtest", |
| ] |
| } |
| |
| fuchsia_unittest_package("intel-thermal-tests") { |
| deps = [ ":intel-thermal-unit-tests" ] |
| } |