| # 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/drivers/fuchsia_driver_component.gni") |
| import("//build/test.gni") |
| import("//zircon/system/ulib/devmgr-integration-test/isolated_devmgr.gni") |
| |
| driver_bind_rules("fallback_rtc_bind") { |
| rules = "fallback_rtc.bind" |
| header_output = "fallback_rtc_bind.h" |
| bind_output = "fallback.bindbc" |
| tests = "bind-tests.json" |
| deps = [ |
| "//src/devices/bind/fuchsia.platform", |
| "//src/devices/bind/test.platform", |
| ] |
| } |
| |
| driver_module("fallback-driver") { |
| output_name = "fallback" |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "rtc-impl.cc" ] |
| deps = [ |
| ":fallback_rtc_bind", |
| "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_llcpp", |
| "//src/devices/lib/driver", |
| "//src/devices/rtc/lib/rtc:rtc_llcpp", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_driver_component("fallback") { |
| component_name = "fallback" |
| deps = [ ":fallback-driver" ] |
| } |
| |
| test("fallback-rtc") { |
| sources = [ "fallback-rtc-test.cc" ] |
| deps = [ |
| ":fallback_rtc_bind", |
| "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_c", |
| "//sdk/lib/fdio", |
| "//src/devices/rtc/lib/rtc", |
| "//src/lib/ddk", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/devmgr-integration-test", |
| "//zircon/system/ulib/driver-integration-test", |
| ] |
| } |
| |
| isolated_devmgr_unittest_package("fallback-rtc-test") { |
| executable_path = "test/fallback-rtc" |
| |
| deps = [ |
| ":fallback", |
| ":fallback-rtc", |
| "//src/devices/board/drivers/integration-test", |
| "//src/devices/bus/drivers/platform", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":fallback-rtc-test", |
| ":fallback_rtc_bind_test", |
| ] |
| } |