blob: 8860ad829903a403307bec7b3b6bb479a5b1e449 [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")
group("tests") {
testonly = true
deps = [
":power-bind_test",
":power-test",
]
}
bind_rules("power-bind") {
rules = "power.bind"
output = "power-bind.h"
tests = "bind-tests.json"
deps = [ "//src/devices/bind/fuchsia.platform" ]
}
driver_module("power") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "power.cc" ]
deps = [
":power-bind",
"//sdk/banjo/fuchsia.hardware.power",
"//sdk/banjo/fuchsia.hardware.powerimpl",
"//src/devices/lib/driver",
"//src/lib/ddk",
"//src/lib/ddk:ddk-metadata-headers",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zx",
]
}
test("power-test-bin") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "generic-power-driver-test"
sources = [
"power-test.cc",
"power.cc",
]
deps = [
":power-bind",
"//sdk/banjo/fuchsia.hardware.power",
"//sdk/banjo/fuchsia.hardware.powerimpl",
"//src/devices/testing/fake_ddk",
"//src/lib/ddk",
"//src/lib/ddk:ddk-metadata-headers",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
]
}
fuchsia_unittest_package("power-test") {
deps = [ ":power-test-bin" ]
}