1# Copyright 2024 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 18config("public_include_path") { 19 include_dirs = [ "public" ] 20} 21 22pw_source_set("iso") { 23 sources = [ 24 "iso_inbound_packet_assembler.cc", 25 "iso_stream.cc", 26 "iso_stream_manager.cc", 27 ] 28 public = [ 29 "public/pw_bluetooth_sapphire/internal/host/iso/iso_common.h", 30 "public/pw_bluetooth_sapphire/internal/host/iso/iso_inbound_packet_assembler.h", 31 "public/pw_bluetooth_sapphire/internal/host/iso/iso_stream.h", 32 "public/pw_bluetooth_sapphire/internal/host/iso/iso_stream_manager.h", 33 ] 34 public_configs = [ ":public_include_path" ] 35 public_deps = [ 36 "$dir_pw_bluetooth:emboss_hci_data", 37 "$dir_pw_bluetooth:emboss_hci_events", 38 "$dir_pw_bluetooth_sapphire/host/common", 39 "$dir_pw_bluetooth_sapphire/host/hci-spec", 40 "$dir_pw_bluetooth_sapphire/host/transport", 41 dir_pw_function, 42 dir_pw_span, 43 ] 44 deps = [ "$dir_pw_bluetooth_sapphire/host/hci" ] 45} 46 47pw_source_set("testing") { 48 testonly = pw_unit_test_TESTONLY 49 public = 50 [ "public/pw_bluetooth_sapphire/internal/host/iso/fake_iso_stream.h" ] 51 public_configs = [ ":public_include_path" ] 52 public_deps = [ ":iso" ] 53} 54 55pw_test("iso_test") { 56 enable_if = pw_unit_test_BACKEND == "$dir_pw_unit_test:googletest" 57 sources = [ 58 "iso_common_test.cc", 59 "iso_inbound_packet_assembler_test.cc", 60 "iso_stream_manager_test.cc", 61 "iso_stream_test.cc", 62 ] 63 test_main = "$dir_pw_bluetooth_sapphire/host/testing:gtest_main" 64 deps = [ 65 ":iso", 66 "$dir_pw_bluetooth_sapphire/host/testing", 67 "$dir_pw_bluetooth_sapphire/host/testing:mock_controller", 68 ] 69} 70 71pw_test_group("tests") { 72 tests = [ ":iso_test" ] 73} 74