| # Copyright 2024 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. |
| |
| load( |
| "@fuchsia_sdk//fuchsia:defs.bzl", |
| "fuchsia_cc_test", |
| "fuchsia_unittest_package", |
| ) |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| cc_library( |
| name = "definitions", |
| srcs = [ |
| "gap.cc", |
| ], |
| deps = [ |
| "//src/connectivity/bluetooth/core/bt-host:public", |
| "//src/connectivity/bluetooth/core/bt-host/common", |
| ], |
| ) |
| |
| cc_library( |
| name = "gap", |
| srcs = [ |
| "adapter.cc", |
| "android_vendor_capabilities.cc", |
| "bredr_connection.cc", |
| "bredr_connection_manager.cc", |
| "bredr_connection_request.cc", |
| "bredr_discovery_manager.cc", |
| "bredr_interrogator.cc", |
| "discovery_filter.cc", |
| "generic_access_client.cc", |
| "identity_resolving_list.cc", |
| "low_energy_address_manager.cc", |
| "low_energy_advertising_manager.cc", |
| "low_energy_connection.cc", |
| "low_energy_connection_handle.cc", |
| "low_energy_connection_manager.cc", |
| "low_energy_connection_request.cc", |
| "low_energy_connector.cc", |
| "low_energy_discovery_manager.cc", |
| "low_energy_interrogator.cc", |
| "pairing_state.cc", |
| "peer.cc", |
| "peer_cache.cc", |
| "peer_metrics.cc", |
| "types.cc", |
| ], |
| deps = [ |
| ":definitions", |
| "//src/connectivity/bluetooth/core/bt-host:public", |
| "//src/connectivity/bluetooth/core/bt-host/common", |
| "//src/connectivity/bluetooth/core/bt-host/gatt", |
| "//src/connectivity/bluetooth/core/bt-host/hci", |
| "//src/connectivity/bluetooth/core/bt-host/iso", |
| "//src/connectivity/bluetooth/core/bt-host/l2cap", |
| "//src/connectivity/bluetooth/core/bt-host/sco", |
| "//src/connectivity/bluetooth/core/bt-host/sdp", |
| "//src/connectivity/bluetooth/core/bt-host/sm", |
| "@pigweed//pw_async:heap_dispatcher", |
| "@pigweed//pw_bluetooth", |
| "@pigweed//third_party/fuchsia:fit", |
| ], |
| ) |
| |
| cc_library( |
| name = "testing", |
| testonly = True, |
| srcs = [ |
| "fake_adapter.cc", |
| "fake_pairing_delegate.cc", |
| ], |
| deps = [ |
| ":gap", |
| "//src/connectivity/bluetooth/core/bt-host:public", |
| "//src/connectivity/bluetooth/core/bt-host/l2cap:testing", |
| "@pigweed//pw_unit_test", |
| ], |
| ) |
| |
| fuchsia_cc_test( |
| name = "gap_test", |
| testonly = True, |
| srcs = [ |
| "adapter_test.cc", |
| "android_vendor_capabilities_test.cc", |
| "bredr_connection_manager_test.cc", |
| "bredr_connection_request_test.cc", |
| "bredr_discovery_manager_test.cc", |
| "bredr_interrogator_test.cc", |
| "discovery_filter_test.cc", |
| "fake_pairing_delegate_test.cc", |
| "identity_resolving_list_test.cc", |
| "low_energy_address_manager_test.cc", |
| "low_energy_advertising_manager_test.cc", |
| "low_energy_connection_manager_test.cc", |
| "low_energy_discovery_manager_test.cc", |
| "low_energy_interrogator_test.cc", |
| "pairing_state_test.cc", |
| "peer_cache_test.cc", |
| "peer_test.cc", |
| "types_test.cc", |
| ], |
| death_unittest = True, |
| visibility = ["//visibility:public"], |
| deps = [ |
| ":gap", |
| ":testing", |
| "//src/connectivity/bluetooth/core/bt-host/common", |
| "//src/connectivity/bluetooth/core/bt-host/gatt:testing", |
| "//src/connectivity/bluetooth/core/bt-host/hci:testing", |
| "//src/connectivity/bluetooth/core/bt-host/l2cap:testing", |
| "//src/connectivity/bluetooth/core/bt-host/sm:testing", |
| "//src/connectivity/bluetooth/core/bt-host/testing", |
| "//src/connectivity/bluetooth/core/bt-host/testing:gtest_main", |
| ], |
| ) |
| |
| fuchsia_unittest_package( |
| name = "test_pkg", |
| package_name = "gap_tests", |
| testonly = True, |
| fuchsia_api_level = "HEAD", |
| unit_tests = [ |
| ":gap_test", |
| ], |
| visibility = ["//visibility:public"], |
| ) |