# Copyright 2023 The Pigweed Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations under # the License. import("//build_overrides/pigweed.gni") import("$dir_pw_fuzzer/fuzzer.gni") import("$dir_pw_unit_test/test.gni") dir_public_common = "../../public/pw_bluetooth_sapphire/internal/host/common" pw_source_set("common") { public = [ "$dir_public_common/advertising_data.h", "$dir_public_common/assert.h", "$dir_public_common/bounded_inspect_list_node.h", "$dir_public_common/byte_buffer.h", "$dir_public_common/device_address.h", "$dir_public_common/device_class.h", "$dir_public_common/error.h", "$dir_public_common/expiring_set.h", "$dir_public_common/fake_inspect.h", "$dir_public_common/host_error.h", "$dir_public_common/identifier.h", "$dir_public_common/inspect.h", "$dir_public_common/inspectable.h", "$dir_public_common/log.h", "$dir_public_common/macros.h", "$dir_public_common/manufacturer_names.h", "$dir_public_common/metrics.h", "$dir_public_common/packet_view.h", "$dir_public_common/pipeline_monitor.h", "$dir_public_common/random.h", "$dir_public_common/retire_log.h", "$dir_public_common/slab_allocator.h", "$dir_public_common/slab_buffer.h", "$dir_public_common/smart_task.h", "$dir_public_common/supplement_data.h", "$dir_public_common/to_string.h", "$dir_public_common/trace.h", "$dir_public_common/uint128.h", "$dir_public_common/uint256.h", "$dir_public_common/uuid.h", "$dir_public_common/weak_self.h", "$dir_public_common/windowed_inspect_numeric_property.h", ] sources = [ "advertising_data.cc", "bounded_inspect_list_node.cc", "byte_buffer.cc", "device_address.cc", "device_class.cc", "host_error.cc", "identifier.cc", "log.cc", "manufacturer_names.cc", "metrics.cc", "random.cc", "retire_log.cc", "slab_allocator.cc", "supplement_data.cc", "uuid.cc", ] public_deps = [ "$dir_pw_assert", "$dir_pw_async:dispatcher", "$dir_pw_async:task", "$dir_pw_bluetooth:emboss_hci_group", "$dir_pw_bluetooth_sapphire:config", "$dir_pw_bluetooth_sapphire/lib/cpp-string", "$dir_pw_bluetooth_sapphire/lib/cpp-type", "$dir_pw_intrusive_ptr", "$dir_pw_log", "$dir_pw_random", "$dir_pw_span", "$dir_pw_string", "$dir_pw_third_party/fuchsia:fit", ] if (current_os == "fuchsia") { public_deps += [ "//sdk/lib/sys/inspect/cpp", "//zircon/system/ulib/trace", ] } } pw_test("common_tests") { sources = [ "advertising_data_test.cc", "bounded_inspect_list_node_test.cc", "byte_buffer_test.cc", "device_address_test.cc", "device_class_test.cc", "error_test.cc", "expiring_set_test.cc", "identifier_test.cc", "inspectable_test.cc", "manufacturer_names_test.cc", "metrics_test.cc", "packet_view_test.cc", "pipeline_monitor_test.cc", "retire_log_test.cc", "slab_allocator_test.cc", "supplement_data_test.cc", "uuid_test.cc", "weak_self_test.cc", "windowed_inspect_numeric_property_test.cc", ] deps = [ ":common", "$dir_pw_async:fake_dispatcher_fixture", "$dir_pw_bluetooth_sapphire/host/testing", ] test_main = "$dir_pw_bluetooth_sapphire/host/testing:gtest_main" } pw_fuzzer("advertising_data_fuzzer") { sources = [ "advertising_data_fuzztest.cc" ] deps = [ ":common" ] } pw_test_group("tests") { tests = [ ":common_tests", ":advertising_data_fuzzer_test", ] }