blob: aad49d0b5b9f619e1a4ec51838591a24a9e9701f [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("//build/test/test_package.gni")
bind_rules("aml-thermal-s912-bind") {
rules = "aml-thermal-s912.bind"
output = "aml-thermal-s912-bind.h"
tests = "aml-thermal-s912-bind-test.json"
deps = [ "//src/devices/bind/amlogic.platform" ]
}
driver_module("aml-thermal-s912") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "aml-thermal.cc" ]
deps = [
":aml-thermal-s912-bind",
"//sdk/banjo/ddk.protocol.composite",
"//sdk/banjo/ddk.protocol.gpio",
"//sdk/banjo/ddk.protocol.scpi",
"//sdk/banjo/ddk.protocol.thermal",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl-utils",
]
}
test("aml-thermal-s912-test") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "aml-thermal-s912-test"
configs += [ "//build/config:all_source" ]
sources = [
"aml-thermal-test.cc",
"aml-thermal.cc",
]
deps = [
":aml-thermal-s912-bind",
"//sdk/banjo/ddk.protocol.composite",
"//sdk/banjo/ddk.protocol.gpio",
"//sdk/banjo/ddk.protocol.gpio:ddk.protocol.gpio_mock",
"//sdk/banjo/ddk.protocol.scpi",
"//sdk/banjo/ddk.protocol.scpi:ddk.protocol.scpi_mock",
"//sdk/banjo/ddk.protocol.thermal",
"//sdk/fidl/fuchsia.hardware.thermal:fuchsia.hardware.thermal_c",
"//src/devices/bus/lib/device-protocol-pdev",
"//src/devices/lib/amlogic",
"//src/devices/testing/fake_ddk",
"//src/lib/ddk",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/mock-function",
"//zircon/public/lib/sync",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
"//zircon/system/ulib/async-loop",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/fidl-utils",
]
}
unittest_package("aml-thermal-s912-test-package") {
package_name = "aml-thermal-s912-test"
deps = [ ":aml-thermal-s912-test" ]
tests = [
{
name = "aml-thermal-s912-test"
environments = basic_envs
},
]
}
group("tests") {
testonly = true
deps = [
":aml-thermal-s912-bind_test",
":aml-thermal-s912-test-package",
]
}