blob: bb753be72cb3f91b977aac8a4a57f846499eb0c5 [file] [log] [blame]
# Copyright 2024 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.
load(
"@fuchsia_sdk//fuchsia:defs.bzl",
"fuchsia_cc_test",
"fuchsia_select",
"fuchsia_unittest_package",
)
package(default_visibility = ["//visibility:public"])
cc_library(
name = "common",
srcs = [
"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",
],
deps = [
"//src/connectivity/bluetooth/core/bt-host:config",
"//src/connectivity/bluetooth/core/bt-host:public",
"//src/connectivity/bluetooth/lib/cpp-string",
"//src/connectivity/bluetooth/lib/cpp-type",
"@pigweed//pw_assert",
"@pigweed//pw_async:dispatcher",
"@pigweed//pw_async:task",
"@pigweed//pw_bluetooth:emboss_hci",
"@pigweed//pw_intrusive_ptr",
"@pigweed//pw_log",
"@pigweed//pw_random",
"@pigweed//pw_span",
"@pigweed//pw_string",
"@pigweed//third_party/fuchsia:fit",
] + fuchsia_select({
"@platforms//os:fuchsia": [
"@fuchsia_sdk//pkg/inspect_component_cpp",
"@fuchsia_sdk//pkg/trace",
],
}),
)
fuchsia_cc_test(
name = "common_test",
testonly = True,
srcs = [
"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",
],
death_unittest = True,
visibility = ["//visibility:public"],
deps = [
":common",
"//src/connectivity/bluetooth/core/bt-host/testing",
"//src/connectivity/bluetooth/core/bt-host/testing:gtest_main",
"@pigweed//pw_async:fake_dispatcher_fixture",
],
)
fuchsia_unittest_package(
name = "test_pkg",
package_name = "common_tests",
testonly = True,
fuchsia_api_level = "HEAD",
unit_tests = [
":common_test",
],
visibility = ["//visibility:public"],
)