| # 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("aml-pwm-bind") { |
| rules = "aml-pwm.bind" |
| output = "aml-pwm-bind.h" |
| tests = "bind-tests.json" |
| deps = [ |
| "//src/devices/bind/amlogic.platform", |
| "//src/devices/bind/fuchsia.platform", |
| ] |
| } |
| |
| driver_module("aml-pwm") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "aml-pwm.cc" ] |
| deps = [ |
| ":common", |
| "//src/devices/lib/driver", |
| ] |
| } |
| |
| test("aml-pwm-test-bin") { |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| output_name = "aml-pwm-test" |
| sources = [ |
| "aml-pwm-test.cc", |
| "aml-pwm.cc", |
| ] |
| deps = [ |
| ":common", |
| "//src/devices/testing/fake_ddk", |
| "//src/devices/testing/mock-mmio-reg", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| group("common") { |
| public_deps = [ |
| ":aml-pwm-bind", |
| "//sdk/banjo/fuchsia.hardware.platform.bus:fuchsia.hardware.platform.bus_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.pwm", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/lib/amlogic", |
| "//src/devices/lib/mmio", |
| "//src/lib/ddk", |
| "//src/lib/ddk:ddk-metadata-headers", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/hwreg", |
| "//zircon/public/lib/zircon-internal", |
| ] |
| } |
| |
| fuchsia_unittest_package("aml-pwm-test") { |
| deps = [ ":aml-pwm-test-bin" ] |
| test_specs = { |
| environments = basic_envs |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":aml-pwm-bind_test", |
| ":aml-pwm-test", |
| ] |
| } |