1# Copyright 2023 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15import("//build_overrides/pigweed.gni") 16import("$dir_pw_unit_test/test.gni") 17 18dir_public_hci = "../../public/pw_bluetooth_sapphire/internal/host/hci" 19 20pw_source_set("hci") { 21 public = [ 22 "$dir_public_hci/acl_connection.h", 23 "$dir_public_hci/android_extended_low_energy_advertiser.h", 24 "$dir_public_hci/bredr_connection.h", 25 "$dir_public_hci/bredr_connection_request.h", 26 "$dir_public_hci/connection.h", 27 "$dir_public_hci/extended_low_energy_advertiser.h", 28 "$dir_public_hci/extended_low_energy_scanner.h", 29 "$dir_public_hci/legacy_low_energy_advertiser.h", 30 "$dir_public_hci/legacy_low_energy_scanner.h", 31 "$dir_public_hci/local_address_delegate.h", 32 "$dir_public_hci/low_energy_advertiser.h", 33 "$dir_public_hci/low_energy_connection.h", 34 "$dir_public_hci/low_energy_connector.h", 35 "$dir_public_hci/low_energy_scanner.h", 36 "$dir_public_hci/sco_connection.h", 37 "$dir_public_hci/sequential_command_runner.h", 38 ] 39 40 sources = [ 41 "acl_connection.cc", 42 "advertising_handle_map.cc", 43 "android_extended_low_energy_advertiser.cc", 44 "bredr_connection.cc", 45 "bredr_connection_request.cc", 46 "connection.cc", 47 "extended_low_energy_advertiser.cc", 48 "extended_low_energy_scanner.cc", 49 "legacy_low_energy_advertiser.cc", 50 "legacy_low_energy_scanner.cc", 51 "low_energy_advertiser.cc", 52 "low_energy_connection.cc", 53 "low_energy_connector.cc", 54 "low_energy_scanner.cc", 55 "sco_connection.cc", 56 "sequential_command_runner.cc", 57 ] 58 59 public_deps = [ 60 "$dir_pw_async:heap_dispatcher", 61 "$dir_pw_bluetooth:emboss_hci_group", 62 "$dir_pw_bluetooth_sapphire/host/transport", 63 "$dir_pw_third_party/fuchsia:fit", 64 ] 65 66 public_configs = [ "$dir_pw_bluetooth_sapphire:public_include_path" ] 67 68 deps = [ "$dir_pw_preprocessor" ] 69} 70 71pw_source_set("testing") { 72 public = [ 73 "$dir_public_hci/fake_bredr_connection.h", 74 "$dir_public_hci/fake_local_address_delegate.h", 75 "$dir_public_hci/fake_low_energy_connection.h", 76 "$dir_public_hci/fake_sco_connection.h", 77 ] 78 79 sources = [ 80 "fake_bredr_connection.cc", 81 "fake_local_address_delegate.cc", 82 "fake_low_energy_connection.cc", 83 "fake_sco_connection.cc", 84 ] 85 86 deps = [ "$dir_pw_async:heap_dispatcher" ] 87 88 public_deps = [ ":hci" ] 89} 90 91pw_test("tests") { 92 sources = [ 93 "advertising_handle_map_test.cc", 94 "connection_test.cc", 95 "extended_low_energy_advertiser_test.cc", 96 "extended_low_energy_scanner_test.cc", 97 "legacy_low_energy_advertiser_test.cc", 98 "legacy_low_energy_scanner_test.cc", 99 "low_energy_advertiser_test.cc", 100 "low_energy_connector_test.cc", 101 "low_energy_multiple_advertising_test.cc", 102 "low_energy_scanner_test.cc", 103 "sequential_command_runner_test.cc", 104 ] 105 106 deps = [ 107 ":testing", 108 "$dir_pw_bluetooth:emboss_hci_test", 109 "$dir_pw_bluetooth_sapphire/host/testing", 110 ] 111 112 test_main = "$dir_pw_bluetooth_sapphire/host/testing:gtest_main" 113} 114