|
| 1 | +# Copyright 2022 The Fuchsia Authors. All rights reserved. |
| 2 | +# Use of this source code is governed by a BSD-style license that can be |
| 3 | +# found in the LICENSE file. |
| 4 | + |
| 5 | +import("//src/connectivity/bluetooth/core/bt-host/build/bt_gtest_package.gni") |
| 6 | + |
| 7 | +group("controllers") { |
| 8 | + public_deps = [ |
| 9 | + ":banjo_controller", |
| 10 | + ":fidl_controller", |
| 11 | + ] |
| 12 | +} |
| 13 | + |
| 14 | +source_set("helpers") { |
| 15 | + visibility = [ ":*" ] |
| 16 | + |
| 17 | + sources = [ |
| 18 | + "helpers.cc", |
| 19 | + "helpers.h", |
| 20 | + ] |
| 21 | + |
| 22 | + public_deps = [ |
| 23 | + "//third_party/pigweed:pw_bluetooth", |
| 24 | + "//zircon/system/ulib/zx", |
| 25 | + ] |
| 26 | +} |
| 27 | + |
| 28 | +source_set("banjo_controller") { |
| 29 | + sources = [ |
| 30 | + "banjo_controller.cc", |
| 31 | + "banjo_controller.h", |
| 32 | + ] |
| 33 | + |
| 34 | + deps = [ |
| 35 | + ":helpers", |
| 36 | + "//src/connectivity/bluetooth/core/bt-host/common", |
| 37 | + "//src/connectivity/bluetooth/core/bt-host/transport", |
| 38 | + "//src/lib/ddk", |
| 39 | + "//zircon/system/ulib/async:async-cpp", |
| 40 | + "//zircon/system/ulib/fbl", |
| 41 | + "//zircon/system/ulib/zx", |
| 42 | + ] |
| 43 | + |
| 44 | + public_deps = [ |
| 45 | + "//sdk/banjo/fuchsia.hardware.bt.hci:fuchsia.hardware.bt.hci_banjo_cpp", |
| 46 | + "//sdk/banjo/fuchsia.hardware.bt.vendor:fuchsia.hardware.bt.vendor_banjo_cpp", |
| 47 | + "//third_party/pigweed:pw_bluetooth", |
| 48 | + "//zircon/system/ulib/async", |
| 49 | + ] |
| 50 | +} |
| 51 | + |
| 52 | +source_set("fidl_controller") { |
| 53 | + sources = [ |
| 54 | + "fidl_controller.cc", |
| 55 | + "fidl_controller.h", |
| 56 | + ] |
| 57 | + |
| 58 | + deps = [ |
| 59 | + ":helpers", |
| 60 | + "//src/connectivity/bluetooth/core/bt-host/common", |
| 61 | + "//src/connectivity/bluetooth/core/bt-host/transport", |
| 62 | + "//src/lib/ddk", |
| 63 | + "//zircon/system/ulib/async:async-cpp", |
| 64 | + "//zircon/system/ulib/zx", |
| 65 | + ] |
| 66 | + |
| 67 | + public_deps = [ |
| 68 | + "//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_hlcpp", |
| 69 | + "//third_party/pigweed:pw_bluetooth", |
| 70 | + "//zircon/system/ulib/async", |
| 71 | + ] |
| 72 | +} |
| 73 | + |
| 74 | +source_set("tests") { |
| 75 | + testonly = true |
| 76 | + |
| 77 | + sources = [ |
| 78 | + "banjo_controller_unittest.cc", |
| 79 | + "fidl_controller_unittest.cc", |
| 80 | + ] |
| 81 | + |
| 82 | + deps = [ |
| 83 | + ":controllers", |
| 84 | + "//src/connectivity/bluetooth/core/bt-host/testing", |
| 85 | + "//src/devices/testing/mock-ddk", |
| 86 | + "//src/lib/ddktl", |
| 87 | + "//src/lib/testing/loop_fixture", |
| 88 | + "//third_party/googletest:gmock", |
| 89 | + "//third_party/googletest:gtest", |
| 90 | + ] |
| 91 | +} |
| 92 | + |
| 93 | +bt_gtest_package("bt-host-controllers-tests") { |
| 94 | + deps = [ ":tests" ] |
| 95 | +} |
0 commit comments