blob: 965affbf1c000a17ab224527040199719b0e406e [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/bind/bind.gni")
import("//build/config/fuchsia/rules.gni")
import("//build/test.gni")
import("//src/sys/build/components.gni")
bind_rules("as370-thermal-bind") {
rules = "as370-thermal.bind"
output = "as370-thermal-bind.h"
tests = "as370-thermal-bind-test.json"
deps = [ "//src/devices/bind/fuchsia.synaptics.platform" ]
}
driver_module("as370-thermal") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "as370-thermal.cc" ]
deps = [
":as370-thermal-bind",
"//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.platform.device",
"//sdk/banjo/fuchsia.hardware.power",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/as370",
"//src/devices/lib/driver",
"//src/devices/lib/mmio",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/system/ulib/fidl-utils",
]
}
test("as370-thermal-test-bin") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "as370-thermal-test"
sources = [
"as370-thermal-test.cc",
"as370-thermal.cc",
]
deps = [
":as370-thermal-bind",
"//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp",
"//sdk/banjo/fuchsia.hardware.clock:fuchsia.hardware.clock_banjo_cpp_mock",
"//sdk/banjo/fuchsia.hardware.platform.device",
"//sdk/banjo/fuchsia.hardware.power",
"//sdk/banjo/fuchsia.hardware.power:fuchsia.hardware.power_mock",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_llcpp",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/as370",
"//src/devices/lib/mmio",
"//src/devices/testing/fake_ddk",
"//src/devices/testing/mock-mmio-reg",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/hwreg",
"//zircon/public/lib/mock-function",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/fidl-utils",
]
# TODO(fxbug.dev/69585): This target uses raw zx::channel with LLCPP which is deprecated.
# Please migrate to typed channel APIs (fidl::ClientEnd<T>, fidl::ServerEnd<T>).
# See linked bug for details.
configs += [ "//build/cpp:fidl-llcpp-deprecated-raw-channels" ]
}
fuchsia_unittest_package("as370-thermal-test") {
deps = [ ":as370-thermal-test-bin" ]
test_specs = {
environments = basic_envs
}
}
group("tests") {
testonly = true
deps = [
":as370-thermal-bind_test",
":as370-thermal-test",
]
}