| # Copyright 2021 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/bazel/bazel_fuchsia_test_package.gni") |
| import("//build_overrides/pigweed.gni") |
| import("$dir_pw_build/target_types.gni") |
| import("$dir_pw_unit_test/test.gni") |
| |
| dir_public_transport = "../public/pw_bluetooth_sapphire/internal/host/transport" |
| |
| pw_source_set("transport") { |
| public = [ |
| "$dir_public_transport/acl_data_channel.h", |
| "$dir_public_transport/acl_data_packet.h", |
| "$dir_public_transport/command_channel.h", |
| "$dir_public_transport/control_packets.h", |
| "$dir_public_transport/data_buffer_info.h", |
| "$dir_public_transport/emboss_control_packets.h", |
| "$dir_public_transport/emboss_packet.h", |
| "$dir_public_transport/error.h", |
| "$dir_public_transport/link_type.h", |
| "$dir_public_transport/packet.h", |
| "$dir_public_transport/sco_data_channel.h", |
| "$dir_public_transport/sco_data_packet.h", |
| "$dir_public_transport/slab_allocators.h", |
| "$dir_public_transport/transport.h", |
| ] |
| |
| sources = [ |
| "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", |
| ] |
| |
| public_deps = [ |
| "$dir_pw_async:dispatcher", |
| "$dir_pw_async:task", |
| "$dir_pw_bluetooth", |
| "$dir_pw_bluetooth:emboss_hci_group", |
| "$dir_pw_bluetooth:emboss_hci_test", |
| "$dir_pw_third_party/fuchsia:fit", |
| "//src/connectivity/bluetooth/core/bt-host/common", |
| "//src/connectivity/bluetooth/core/bt-host/hci-spec", |
| ] |
| } |
| |
| pw_source_set("testing") { |
| testonly = true |
| |
| public = [ |
| "$dir_public_transport/fake_sco_data_channel.h", |
| "$dir_public_transport/mock_acl_data_channel.h", |
| ] |
| sources = [ |
| "fake_sco_data_channel.cc", |
| "mock_acl_data_channel.cc", |
| ] |
| |
| public_deps = [ ":transport" ] |
| } |
| |
| pw_test("tests") { |
| sources = [ |
| "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", |
| ] |
| |
| deps = [ |
| ":transport", |
| "//src/connectivity/bluetooth/core/bt-host/testing", |
| ] |
| } |
| |
| bazel_fuchsia_test_package("test_pkg") { |
| test_package_name = "transport_tests" |
| test_component_names = [ "transport_test_autogen_cml" ] |
| } |