blob: 7593187c358700cafa53a6875ebf58cf691dc5fb [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/config/fuchsia/rules.gni")
import("//build/test.gni")
import("//build/test/test_package.gni")
group("tests") {
testonly = true
deps = [ ":power-test-package" ]
}
driver_module("power") {
configs += [
"//build/config:all_source",
"//build/config/fuchsia:enable_zircon_asserts",
]
configs += [ "//build/unification/config:zircon-migrated" ]
sources = [ "power.cc" ]
deps = [
"//sdk/banjo/ddk.protocol.composite",
"//sdk/banjo/ddk.protocol.power",
"//sdk/banjo/ddk.protocol.powerimpl",
"//src/devices/lib/driver",
"//src/lib/ddk",
# TODO(fxb/38132): Migrate to the new bind rules and delete the below
"//src/lib/ddk:ddk-deprecated-binding-headers",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zx",
]
}
test("power-test") {
configs += [ "//build/unification/config:zircon-migrated" ]
output_name = "generic-power-driver-test"
sources = [
"power-test.cc",
"power.cc",
]
deps = [
"//sdk/banjo/ddk.protocol.composite",
"//sdk/banjo/ddk.protocol.power",
"//sdk/banjo/ddk.protocol.powerimpl",
"//src/devices/testing/fake_ddk",
"//src/lib/ddk",
# TODO(fxb/38132): Migrate to the new bind rules and delete the below
"//src/lib/ddk:ddk-deprecated-binding-headers",
"//src/lib/ddktl",
"//zircon/public/lib/fbl",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/public/lib/zxtest",
]
}
unittest_package("power-test-package") {
package_name = "power-test"
deps = [ ":power-test" ]
tests = [
{
name = "generic-power-driver-test"
},
]
}