| # Copyright 2017 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/fuzz.gni") |
| 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_intrusive_ptr", |
| "$dir_pw_log", |
| "$dir_pw_random", |
| "$dir_pw_span", |
| "$dir_pw_string", |
| "$dir_pw_third_party/fuchsia:fit", |
| "//src/connectivity/bluetooth/core/bt-host:config", |
| "//src/connectivity/bluetooth/lib/cpp-string", |
| "//src/connectivity/bluetooth/lib/cpp-type", |
| ] |
| |
| if (current_os == "fuchsia") { |
| public_deps += [ |
| "//sdk/lib/inspect/component/cpp", |
| "//zircon/system/ulib/trace", |
| ] |
| } |
| } |
| |
| pw_test("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", |
| "//src/connectivity/bluetooth/core/bt-host/testing", |
| ] |
| |
| test_main = "//src/connectivity/bluetooth/core/bt-host/testing:gtest_main" |
| } |
| |
| fuchsia_library_fuzzer("advertising_data_fuzzer") { |
| sources = [ "advertising_data_fuzztest.cc" ] |
| deps = [ |
| ":common", |
| "//src/connectivity/bluetooth/core/bt-host/testing:fuzztest_driver", |
| ] |
| } |
| |
| pw_fuzzer("pw_advertising_data_fuzzer") { |
| sources = [ "advertising_data_fuzztest.cc" ] |
| deps = [ ":common" ] |
| } |
| |
| pw_test_group("tests_and_fuzzers") { |
| tests = [ |
| ":tests", |
| ":pw_advertising_data_fuzzer_test", |
| ] |
| } |
| |
| bazel_fuchsia_test_package("test_pkg") { |
| test_package_name = "common_tests" |
| test_component_names = [ "common_test_autogen_cml" ] |
| } |