blob: b0629218706abad8c4e05b6186d32bb0d52fe630 [file] [log] [blame]
# 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 = "transport",
srcs = [
"acl_data_channel.cc",
"acl_data_packet.cc",
"command_channel.cc",
"control_packets.cc",
"emboss_control_packets.cc",
"error.cc",
"link_type.cc",
"sco_data_channel.cc",
"sco_data_packet.cc",
"transport.cc",
],
deps = [
"//src/connectivity/bluetooth/core/bt-host:public",
"//src/connectivity/bluetooth/core/bt-host/common",
"//src/connectivity/bluetooth/core/bt-host/hci-spec",
"@pigweed//pw_async:dispatcher",
"@pigweed//pw_async:task",
"@pigweed//pw_bluetooth",
"@pigweed//pw_bluetooth:emboss_hci",
"@pigweed//pw_bluetooth:emboss_hci_test",
"@pigweed//third_party/fuchsia:fit",
],
)
cc_library(
name = "testing",
srcs = [
"fake_sco_data_channel.cc",
"mock_acl_data_channel.cc",
],
deps = [
":transport",
"//src/connectivity/bluetooth/core/bt-host:public",
],
)
fuchsia_cc_test(
name = "transport_test",
testonly = True,
srcs = [
"acl_data_channel_test.cc",
"command_channel_test.cc",
"emboss_control_packets_test.cc",
"emboss_packet_test.cc",
"packet_test.cc",
"sco_data_channel_test.cc",
"sco_data_packet_test.cc",
"slab_allocators_test.cc",
"transport_test.cc",
],
death_unittest = True,
visibility = ["//visibility:public"],
deps = [
":transport",
"//src/connectivity/bluetooth/core/bt-host/testing",
"//src/connectivity/bluetooth/core/bt-host/testing:gtest_main",
],
)
fuchsia_unittest_package(
name = "test_pkg",
package_name = "transport_tests",
testonly = True,
fuchsia_api_level = "HEAD",
unit_tests = [
":transport_test",
],
visibility = ["//visibility:public"],
)