blob: 3481268a0e644e526a5e93d059ff02a78edd798e [file] [log] [blame]
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "system_bt_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
// SPDX-license-identifier-BSD
default_applicable_licenses: ["system_bt_license"],
}
crypto_toolbox_srcs = [
"crypto_toolbox/aes.cc",
"crypto_toolbox/aes_cmac.cc",
"crypto_toolbox/crypto_toolbox.cc",
]
cc_test_library {
name: "crypto_toolbox_for_tests",
static_libs: ["libchrome"],
defaults: ["fluoride_defaults"],
host_supported: true,
include_dirs: [
"packages/modules/Bluetooth/system",
],
shared_libs: [
"libcutils",
"liblog",
],
srcs: crypto_toolbox_srcs,
header_libs: ["libbluetooth_headers"],
}
// Bluetooth stack static library for target
cc_library_static {
name: "libbt-stack",
defaults: ["fluoride_defaults"],
local_include_dirs: [
"avct",
"avdt",
"avrc",
"bnep",
"btm",
"eatt",
"gap",
"gatt",
"hid",
"include",
"l2cap",
"metrics",
"pan",
"sdp",
"smp",
"srvc",
],
header_libs: [
"libbluetooth_headers",
],
include_dirs: [
"external/aac/libAACdec/include",
"external/aac/libAACenc/include",
"external/aac/libSYS/include",
"external/libldac/abr/inc",
"external/libldac/inc",
"external/libopus/include",
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/bta/include",
"packages/modules/Bluetooth/system/bta/sys",
"packages/modules/Bluetooth/system/btif/include",
"packages/modules/Bluetooth/system/device/include",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/gd/hal",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/udrv/include",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: crypto_toolbox_srcs + [
"a2dp/a2dp_aac.cc",
"a2dp/a2dp_aac_decoder.cc",
"a2dp/a2dp_aac_encoder.cc",
"a2dp/a2dp_api.cc",
"a2dp/a2dp_codec_config.cc",
"a2dp/a2dp_sbc.cc",
"a2dp/a2dp_sbc_decoder.cc",
"a2dp/a2dp_sbc_encoder.cc",
"a2dp/a2dp_sbc_up_sample.cc",
"a2dp/a2dp_vendor.cc",
"a2dp/a2dp_vendor_aptx.cc",
"a2dp/a2dp_vendor_aptx_encoder.cc",
"a2dp/a2dp_vendor_aptx_hd.cc",
"a2dp/a2dp_vendor_aptx_hd_encoder.cc",
"a2dp/a2dp_vendor_ldac.cc",
"a2dp/a2dp_vendor_ldac_decoder.cc",
"a2dp/a2dp_vendor_ldac_encoder.cc",
"a2dp/a2dp_vendor_opus.cc",
"a2dp/a2dp_vendor_opus_decoder.cc",
"a2dp/a2dp_vendor_opus_encoder.cc",
"avct/avct_api.cc",
"avct/avct_bcb_act.cc",
"avct/avct_ccb.cc",
"avct/avct_l2c.cc",
"avct/avct_l2c_br.cc",
"avct/avct_lcb.cc",
"avct/avct_lcb_act.cc",
"avdt/avdt_ad.cc",
"avdt/avdt_api.cc",
"avdt/avdt_ccb.cc",
"avdt/avdt_ccb_act.cc",
"avdt/avdt_l2c.cc",
"avdt/avdt_msg.cc",
"avdt/avdt_scb.cc",
"avdt/avdt_scb_act.cc",
"avrc/avrc_api.cc",
"avrc/avrc_bld_ct.cc",
"avrc/avrc_bld_tg.cc",
"avrc/avrc_opt.cc",
"avrc/avrc_pars_ct.cc",
"avrc/avrc_pars_tg.cc",
"avrc/avrc_sdp.cc",
"avrc/avrc_utils.cc",
"bnep/bnep_api.cc",
"bnep/bnep_main.cc",
"bnep/bnep_utils.cc",
"btm/hfp_lc3_decoder.cc",
"btm/hfp_lc3_encoder.cc",
"btm/hfp_msbc_decoder.cc",
"btm/hfp_msbc_encoder.cc",
"hid/hidd_api.cc",
"hid/hidd_conn.cc",
"hid/hidh_api.cc",
"hid/hidh_conn.cc",
"pan/pan_api.cc",
"pan/pan_main.cc",
"pan/pan_utils.cc",
],
static_libs: [
"libbt-hci",
"libbt-platform-protos-lite",
"libbt-stack-core",
"libbt_shim_bridge",
"liblc3",
],
whole_static_libs: [
"libaptx_enc",
"libaptxhd_enc",
"libcom.android.sysprop.bluetooth",
"libldacBT_abr",
"libldacBT_enc",
],
apex_available: [
"com.android.btservices",
],
host_supported: true,
min_sdk_version: "Tiramisu",
}
filegroup {
name: "LegacyStackSdp",
srcs: [
"sdp/sdp_api.cc",
"sdp/sdp_db.cc",
"sdp/sdp_discovery.cc",
"sdp/sdp_main.cc",
"sdp/sdp_server.cc",
"sdp/sdp_utils.cc",
],
}
cc_library_static {
name: "libbt-stack-core",
defaults: ["fluoride_defaults"],
local_include_dirs: [
"avct",
"avdt",
"avrc",
"bnep",
"btm",
"eatt",
"gap",
"gatt",
"hid",
"include",
"l2cap",
"metrics",
"pan",
"sdp",
"smp",
"srvc",
],
header_libs: [
"libbluetooth_headers",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/bta/include",
"packages/modules/Bluetooth/system/bta/sys",
"packages/modules/Bluetooth/system/btif/include",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/udrv/include",
],
srcs: crypto_toolbox_srcs + [
":LegacyStackSdp",
"acl/acl.cc",
"acl/ble_acl.cc",
"acl/btm_acl.cc",
"acl/btm_ble_connection_establishment.cc",
"acl/btm_pm.cc",
"arbiter/acl_arbiter.cc",
"btm/ble_advertiser_hci_interface.cc",
"btm/ble_scanner_hci_interface.cc",
"btm/btm_ble.cc",
"btm/btm_ble_addr.cc",
"btm/btm_ble_adv_filter.cc",
"btm/btm_ble_batchscan.cc",
"btm/btm_ble_bgconn.cc",
"btm/btm_ble_cont_energy.cc",
"btm/btm_ble_gap.cc",
"btm/btm_ble_privacy.cc",
"btm/btm_ble_scanner.cc",
"btm/btm_client_interface.cc",
"btm/btm_dev.cc",
"btm/btm_devctl.cc",
"btm/btm_inq.cc",
"btm/btm_iot_config.cc",
"btm/btm_iso.cc",
"btm/btm_main.cc",
"btm/btm_scn.cc",
"btm/btm_sco.cc",
"btm/btm_sco_hci.cc",
"btm/btm_sco_hfp_hal.cc",
"btm/btm_sec.cc",
"btu/btu_hcif.cc",
"btu/btu_task.cc",
"eatt/eatt.cc",
"gap/gap_ble.cc",
"gap/gap_conn.cc",
"gatt/att_protocol.cc",
"gatt/connection_manager.cc",
"gatt/gatt_api.cc",
"gatt/gatt_attr.cc",
"gatt/gatt_auth.cc",
"gatt/gatt_cl.cc",
"gatt/gatt_db.cc",
"gatt/gatt_main.cc",
"gatt/gatt_sr.cc",
"gatt/gatt_sr_hash.cc",
"gatt/gatt_utils.cc",
"hcic/hciblecmds.cc",
"hcic/hcicmds.cc",
"l2cap/l2c_api.cc",
"l2cap/l2c_ble.cc",
"l2cap/l2c_csm.cc",
"l2cap/l2c_fcr.cc",
"l2cap/l2c_link.cc",
"l2cap/l2c_main.cc",
"l2cap/l2c_utils.cc",
"metrics/stack_metrics_logging.cc",
"rfcomm/port_api.cc",
"rfcomm/port_rfc.cc",
"rfcomm/port_utils.cc",
"rfcomm/rfc_l2cap_if.cc",
"rfcomm/rfc_mx_fsm.cc",
"rfcomm/rfc_port_fsm.cc",
"rfcomm/rfc_port_if.cc",
"rfcomm/rfc_ts_frames.cc",
"rfcomm/rfc_utils.cc",
"smp/p_256_curvepara.cc",
"smp/p_256_ecc_pp.cc",
"smp/p_256_multprecision.cc",
"smp/smp_act.cc",
"smp/smp_api.cc",
"smp/smp_br_main.cc",
"smp/smp_keys.cc",
"smp/smp_l2c.cc",
"smp/smp_main.cc",
"smp/smp_utils.cc",
"srvc/srvc_dis.cc",
"srvc/srvc_eng.cc",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
cflags: [
/* we export all classes, so change default visibility, instead of having EXPORT_SYMBOL on each class*/
"-fvisibility=default",
],
static_libs: [
"libbluetooth_core_rs",
"libbluetooth_gd",
"libbt-hci",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
],
shared_libs: [
"libPlatformProperties",
"libcrypto",
],
apex_available: [
"com.android.btservices",
],
host_supported: true,
min_sdk_version: "Tiramisu",
}
cc_defaults {
name: "btstack_fuzzer_default",
host_supported: true,
cflags: [
"-DHAS_NO_BDROID_BUILDCFG",
"-Wall",
"-Werror",
"-Wextra",
// Mocked components have too many unused parameters
"-Wno-unused-parameter",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/include",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/stack/include",
"packages/modules/Bluetooth/system/test/common",
"packages/modules/Bluetooth/system/types",
],
static_libs: [
"libchrome",
],
shared_libs: [
"liblog",
],
target: {
darwin: {
enabled: false,
},
android: {
shared_libs: [
"libcutils",
"libutils",
],
},
host: {
cflags: [
"-DOS_GENERIC",
],
},
},
fuzz_config: {
// Options for performance improvement
libfuzzer_options: [
// This disables the stdout and stderr
"close_fd_mask=3",
// This limits the maximum corpus size to 4KB
"max_len=4096",
// TODO: b/280300628 for fixing memory leaks. Until it's fixed leak
// detection needs to be turned off to unblock fuzzing.
"detect_leaks=0",
],
cc: [
"android-bluetooth-security@google.com",
"android-security-assurance-redteam@google.com",
],
componentid: 27441, // Android > Android OS & Apps > Systems > bluetooth
hotlists: [
"3705175", // ASA Red Team Discovered Issues
"4810445", // ASA Red Team: Bluetooth Engagement Issues
],
acknowledgement: [
"Android Bluetooth Team of Google",
"Android Red Team of Google",
],
},
}
cc_fuzz {
name: "sdp-fuzzer",
defaults: [
"btstack_fuzzer_default",
"fluoride_defaults",
],
include_dirs: [
"packages/modules/Bluetooth/system/stack/btm",
],
srcs: [
":LegacyStackSdp",
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestFakeOsi",
":TestMockBtif",
":TestMockDevice",
":TestMockGdOsLoggingLogRedaction",
":TestMockStackBtm",
":TestMockStackL2cap",
":TestMockStackMetrics",
"fuzzers/sdp_fuzzer.cc",
],
static_libs: [
"libbluetooth-types",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
],
}
cc_fuzz {
name: "gatt-fuzzer",
defaults: [
"btstack_fuzzer_default",
"fluoride_defaults",
],
include_dirs: [
"external/flatbuffers/include",
"external/rust/crates/quiche/deps/boringssl/src/include",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: crypto_toolbox_srcs + [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestFakeOsi",
":TestMockBtif",
":TestMockDevice",
":TestMockGdOsLoggingLogRedaction",
":TestMockMainShim",
":TestMockRustFfi",
":TestMockSrvcDis",
":TestMockStackAcl",
":TestMockStackArbiter",
":TestMockStackBtm",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
":TestMockStackSdp",
"eatt/*.cc",
"fuzzers/gatt_fuzzer.cc",
"gatt/*.cc",
],
static_libs: [
"libbluetooth-types",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libgmock",
],
}
cc_fuzz {
name: "smp-fuzzer",
defaults: [
"btstack_fuzzer_default",
"fluoride_defaults",
],
include_dirs: [
"external/flatbuffers/include",
"external/rust/crates/quiche/deps/boringssl/src/include",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: crypto_toolbox_srcs + [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestFakeOsi",
":TestMockBtif",
":TestMockDevice",
":TestMockGdOsLoggingLogRedaction",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
"fuzzers/smp_fuzzer.cc",
"smp/*.cc", // add other sources files (p256 related) under smp into this test
],
static_libs: [
"libbluetooth-types",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libgmock",
],
}
cc_fuzz {
name: "bnep-fuzzer",
defaults: [
"btstack_fuzzer_default",
"fluoride_defaults",
],
include_dirs: [
"external/flatbuffers/include",
"external/rust/crates/quiche/deps/boringssl/src/include",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestFakeOsi",
":TestMockBtif",
":TestMockDevice",
":TestMockGdOsLoggingLogRedaction",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
"bnep/*.cc",
"fuzzers/bnep_fuzzer.cc",
],
static_libs: [
"libbluetooth-types",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libgmock",
],
}
cc_fuzz {
name: "avrc-fuzzer",
defaults: [
"btstack_fuzzer_default",
"fluoride_defaults",
],
include_dirs: [
"external/flatbuffers/include",
"external/rust/crates/quiche/deps/boringssl/src/include",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestFakeOsi",
":TestMockBtif",
":TestMockDevice",
":TestMockGdOsLoggingLogRedaction",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
":TestMockStackSdp",
"avct/*.cc",
"avrc/*.cc",
"fuzzers/avrc_fuzzer.cc",
],
static_libs: [
"libbluetooth-types",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libgmock",
"libosi",
],
target: {
android: {
static_libs: [
"libcom.android.sysprop.bluetooth",
],
},
},
}
cc_fuzz {
name: "l2cap-fuzzer",
defaults: [
"btstack_fuzzer_default",
"fluoride_defaults",
],
include_dirs: [
"external/flatbuffers/include",
"external/rust/crates/quiche/deps/boringssl/src/include",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestFakeOsi",
":TestMockBtif",
":TestMockDevice",
":TestMockGdOsLoggingLogRedaction",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackHcic",
":TestMockStackMetrics",
"fuzzers/l2cap_fuzzer.cc",
"l2cap/*.cc",
],
static_libs: [
"libbluetooth-types",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libgmock",
],
target: {
android: {
shared_libs: [
"libPlatformProperties",
],
},
},
}
// Bluetooth stack unit tests for target
cc_test {
name: "net_test_stack",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
local_include_dirs: [
"include",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
],
srcs: [
"test/gatt/gatt_api_test.cc",
"test/stack_a2dp_test.cc",
"test/stack_avrcp_test.cc",
],
shared_libs: [
"android.hardware.bluetooth.audio@2.0",
"android.hardware.bluetooth.audio@2.1",
"libPlatformProperties",
"libaaudio",
"libbinder_ndk",
"libcrypto",
"libcutils",
"libdl",
"libfmq",
"libhidlbase",
"liblog",
"libstatssocket",
"libutils",
"libz",
],
static_libs: [
"android.hardware.audio.common-V2-ndk",
"android.hardware.bluetooth.a2dp@1.0",
"android.hardware.bluetooth.audio-V3-ndk",
"android.hardware.bluetooth@1.0",
"android.hardware.bluetooth@1.1",
"android.hardware.common-V2-ndk",
"android.hardware.common.fmq-V1-ndk",
"android.media.audio.common.types-V2-ndk",
"android.system.suspend.control-V1-ndk",
"libFraunhoferAAC",
"libbluetooth-dumpsys",
"libbluetooth-types",
"libbluetooth_core_rs",
"libbt-audio-hal-interface",
"libbt-bta",
"libbt-bta-core",
"libbt-common",
"libbt-hci",
"libbt-sbc-decoder",
"libbt-sbc-encoder",
"libbt-stack",
"libbt-stack-core",
"libbt_shim_bridge",
"libbtcore",
"libbtdevice",
"libbtif",
"libbtif-core",
"libchrome",
"libg722codec",
"liblc3",
"libopus",
"libosi",
"libprotobuf-cpp-lite",
"libstatslog_bt",
"libudrv-uipc",
],
whole_static_libs: [
"libbluetooth-for-tests",
],
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_rfcomm",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
host_supported: true,
local_include_dirs: [
"btm",
"include",
"l2cap",
"rfcomm",
"smp",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/gd/hal",
"packages/modules/Bluetooth/system/internal_include",
],
srcs: [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestMockHci",
":TestMockMainShim",
":TestMockStackMetrics",
"rfcomm/port_api.cc",
"rfcomm/port_rfc.cc",
"rfcomm/port_utils.cc",
"rfcomm/rfc_l2cap_if.cc",
"rfcomm/rfc_mx_fsm.cc",
"rfcomm/rfc_port_fsm.cc",
"rfcomm/rfc_port_if.cc",
"rfcomm/rfc_ts_frames.cc",
"rfcomm/rfc_utils.cc",
"test/common/mock_btm_layer.cc",
"test/common/mock_btu_layer.cc",
"test/common/mock_l2cap_layer.cc",
"test/common/stack_test_packet_utils.cc",
"test/rfcomm/stack_rfcomm_test.cc",
"test/rfcomm/stack_rfcomm_test_main.cc",
"test/rfcomm/stack_rfcomm_test_utils.cc",
"test/rfcomm/stack_rfcomm_test_utils_test.cc",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
shared_libs: [
"libcrypto",
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libprotobuf-cpp-lite",
"libstatslog_bt",
],
target: {
android: {
shared_libs: [
"libstatssocket",
],
},
},
sanitize: {
cfi: false,
},
header_libs: ["libbluetooth_headers"],
}
// Bluetooth stack smp unit tests for target
cc_test {
name: "net_test_stack_smp",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
host_supported: true,
test_suites: ["device-tests"],
local_include_dirs: [
"btm",
"include",
"l2cap",
"smp",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
],
srcs: crypto_toolbox_srcs + [
":TestCommonLogMsg",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestMockBtif",
":TestMockCommon",
":TestMockDevice",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
"smp/p_256_curvepara.cc",
"smp/p_256_ecc_pp.cc",
"smp/p_256_multprecision.cc",
"smp/smp_act.cc",
"smp/smp_api.cc",
"smp/smp_br_main.cc",
"smp/smp_keys.cc",
"smp/smp_l2c.cc",
"smp/smp_main.cc",
"smp/smp_utils.cc",
"test/crypto_toolbox_test.cc",
"test/stack_smp_test.cc",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
shared_libs: [
"libcrypto",
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
],
header_libs: ["libbluetooth_headers"],
}
// Bluetooth stack advertise data parsing unit tests for target
cc_test {
name: "net_test_stack_ad_parser",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
local_include_dirs: [
"include",
],
srcs: [
"test/ad_parser_unittest.cc",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
],
static_libs: [
"android.system.suspend.control-V1-ndk",
"libbluetooth-types",
"libgmock",
"liblog",
],
}
// Bluetooth stack connection multiplexing
cc_test {
name: "net_test_gatt_conn_multiplexing",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
host_supported: true,
test_suites: ["general-tests"],
local_include_dirs: [
"btm",
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
],
srcs: [
":TestCommonMainHandler",
"gatt/connection_manager.cc",
"test/common/mock_btm_api_layer.cc",
"test/gatt_connection_manager_test.cc",
],
shared_libs: [
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libevent",
"libgmock",
"liblog",
],
sanitize: {
cfi: false,
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_gatt_native",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/btm",
"packages/modules/Bluetooth/system/stack/eatt",
"packages/modules/Bluetooth/system/stack/include",
"packages/modules/Bluetooth/system/stack/l2cap",
],
srcs: [
":TestCommonMockFunctions",
":TestMockRustFfi",
":TestMockStackArbiter",
":TestMockStackBtm",
":TestMockStackSdp",
"gatt/gatt_utils.cc",
"test/common/mock_eatt.cc",
"test/common/mock_gatt_layer.cc",
"test/common/mock_main_shim.cc",
"test/gatt/gatt_sr_test.cc",
],
shared_libs: [
"libcrypto",
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libstatslog_bt",
],
target: {
android: {
shared_libs: [
"libstatssocket",
],
},
},
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_avdtp",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
include_dirs: [
"external/libldac/inc",
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/include",
],
srcs: [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestMockBta",
":TestMockDevice",
":TestMockStackA2dp",
":TestMockStackAcl",
":TestMockStackL2cap",
"avdt/avdt_ad.cc",
"avdt/avdt_api.cc",
"avdt/avdt_ccb.cc",
"avdt/avdt_ccb_act.cc",
"avdt/avdt_l2c.cc",
"avdt/avdt_scb.cc",
"avdt/avdt_scb_act.cc",
"test/common/mock_btu_layer.cc",
"test/common/mock_stack_avdt_msg.cc",
"test/stack_avdtp_test.cc",
],
shared_libs: [
"libcrypto",
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libevent",
"liblog",
"libosi",
"libprotobuf-cpp-lite",
"libstatslog_bt",
],
target: {
android: {
shared_libs: ["libstatssocket"],
},
},
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_a2dp_codecs_native",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
cflags: [
"-DUNIT_TESTS",
],
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
include_dirs: [
"external/aac/libAACdec/include",
"external/aac/libAACenc/include",
"external/aac/libSYS/include",
"external/libldac/abr/inc",
"external/libldac/inc",
"external/libopus/include",
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/btif/include",
"packages/modules/Bluetooth/system/embdrv/encoder_for_aptxhd/include",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/include",
],
target: {
host: {
srcs: [
":BluetoothHostTestingLogCapture",
],
},
android: {
srcs: [
":BluetoothAndroidTestingLogCapture",
],
test_config: "test/a2dp/AndroidTest.xml",
},
android_x86: {
test_config: "test/a2dp/AndroidTestForce32.xml",
},
},
data: [
"test/a2dp/raw_data/*",
],
srcs: [
":TestCommonMockFunctions",
":TestMockBta",
":TestMockStackA2dpApi",
"a2dp/a2dp_aac.cc",
"a2dp/a2dp_aac_decoder.cc",
"a2dp/a2dp_aac_encoder.cc",
"a2dp/a2dp_codec_config.cc",
"a2dp/a2dp_sbc.cc",
"a2dp/a2dp_sbc_decoder.cc",
"a2dp/a2dp_sbc_encoder.cc",
"a2dp/a2dp_sbc_up_sample.cc",
"a2dp/a2dp_vendor.cc",
"a2dp/a2dp_vendor_aptx.cc",
"a2dp/a2dp_vendor_aptx_encoder.cc",
"a2dp/a2dp_vendor_aptx_hd.cc",
"a2dp/a2dp_vendor_aptx_hd_encoder.cc",
"a2dp/a2dp_vendor_ldac.cc",
"a2dp/a2dp_vendor_ldac_decoder.cc",
"a2dp/a2dp_vendor_ldac_encoder.cc",
"a2dp/a2dp_vendor_opus.cc",
"a2dp/a2dp_vendor_opus_decoder.cc",
"a2dp/a2dp_vendor_opus_encoder.cc",
"test/a2dp/a2dp_aac_unittest.cc",
"test/a2dp/a2dp_opus_unittest.cc",
"test/a2dp/a2dp_sbc_regression_tests.cc",
"test/a2dp/a2dp_sbc_unittest.cc",
"test/a2dp/a2dp_vendor_ldac_unittest.cc",
"test/a2dp/a2dp_vendor_regression_tests.cc",
"test/a2dp/mock_bta_av_codec.cc",
"test/a2dp/test_util.cc",
"test/a2dp/wav_reader.cc",
"test/a2dp/wav_reader_unittest.cc",
],
shared_libs: [
"libcrypto",
"libcutils",
"libprotobuf-cpp-lite",
],
static_libs: [
"libFraunhoferAAC",
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-sbc-decoder",
"libbt-sbc-encoder",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libgmock",
"liblog",
"libopus",
"libosi",
],
whole_static_libs: [
"libaptx_enc",
"libaptxhd_enc",
"libldacBT_abr",
"libldacBT_enc",
],
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_a2dp_native",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
include_dirs: [
"external/libldac/inc",
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/include",
],
srcs: [
"a2dp/a2dp_vendor_ldac_decoder.cc",
"test/a2dp/a2dp_vendor_ldac_decoder_test.cc",
"test/a2dp/misc_fake.cc",
],
shared_libs: [
"libcrypto",
"libcutils",
],
static_libs: [
"libbt-common",
"libbt_shim_bridge",
"libchrome",
"liblog",
"libosi",
],
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
header_libs: ["libbluetooth_headers"],
}
// gatt sr hash test
cc_test {
name: "net_test_stack_gatt_sr_hash_native",
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
host_supported: true,
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/btm",
"packages/modules/Bluetooth/system/stack/eatt",
"packages/modules/Bluetooth/system/stack/include",
],
srcs: crypto_toolbox_srcs + [
":LegacyStackSdp",
":TestCommonLogMsg",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestMockBtif",
":TestMockDevice",
":TestMockRustFfi",
":TestMockStackBtm",
":TestMockStackL2cap",
":TestMockStackMetrics",
"gatt/gatt_db.cc",
"gatt/gatt_sr_hash.cc",
"gatt/gatt_utils.cc",
"test/common/mock_eatt.cc",
"test/common/mock_gatt_layer.cc",
"test/common/mock_main_shim.cc",
"test/gatt/mock_gatt_utils_ref.cc",
"test/stack_gatt_sr_hash_test.cc",
],
shared_libs: [
"libcrypto",
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libstatslog_bt",
],
target: {
android: {
shared_libs: ["libstatssocket"],
},
},
header_libs: ["libbluetooth_headers"],
}
// Iso manager unit tests
cc_test {
name: "net_test_btm_iso",
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"btm",
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
],
srcs: [
":TestCommonStackConfig",
"btm/btm_iso.cc",
"test/btm_iso_test.cc",
"test/common/mock_controller.cc",
"test/common/mock_gatt_layer.cc",
"test/common/mock_hcic_layer.cc",
],
static_libs: [
"libbluetooth-types",
"libbt-common",
"libbt_shim_bridge",
"libchrome",
"libgmock",
"liblog",
"libosi",
],
sanitize: {
cfi: true,
scs: true,
address: true,
all_undefined: true,
integer_overflow: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
// EATT unit tests
cc_test {
name: "net_test_eatt",
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"btm",
"eatt",
"gatt",
"include",
"l2cap",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
],
srcs: [
":TestCommonMainHandler",
":TestCommonStackConfig",
"eatt/eatt.cc",
"test/common/mock_btif_storage.cc",
"test/common/mock_btm_api_layer.cc",
"test/common/mock_controller.cc",
"test/common/mock_gatt_layer.cc",
"test/common/mock_l2cap_layer.cc",
"test/eatt/eatt_test.cc",
"test/gatt/mock_gatt_utils_ref.cc",
],
shared_libs: [
"libcrypto",
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libprotobuf-cpp-lite",
"libstatslog_bt",
],
target: {
android: {
shared_libs: ["libstatssocket"],
},
},
sanitize: {
cfi: false,
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_btm",
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"btm",
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/device/include",
"packages/modules/Bluetooth/system/gd",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: crypto_toolbox_srcs + [
":BluetoothHalSources_hci_host",
":BluetoothOsSources_host",
":OsiCompatSources",
":TestCommonLogMsg",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestFakeLooper",
":TestFakeOsi",
":TestFakeThread",
":TestMockBta",
":TestMockBtif",
":TestMockDevice",
":TestMockLegacyHciInterface",
":TestMockMainBte",
":TestMockMainShim",
":TestMockRustFfi",
":TestMockStackBtu",
":TestMockStackGap",
":TestMockStackGatt",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackSmp",
":TestMockUdrv",
"acl/acl.cc",
"acl/ble_acl.cc",
"acl/btm_acl.cc",
"acl/btm_ble_connection_establishment.cc",
"acl/btm_pm.cc",
"btm/ble_advertiser_hci_interface.cc",
"btm/ble_scanner_hci_interface.cc",
"btm/btm_ble.cc",
"btm/btm_ble_addr.cc",
"btm/btm_ble_adv_filter.cc",
"btm/btm_ble_batchscan.cc",
"btm/btm_ble_bgconn.cc",
"btm/btm_ble_cont_energy.cc",
"btm/btm_ble_gap.cc",
"btm/btm_ble_privacy.cc",
"btm/btm_ble_scanner.cc",
"btm/btm_client_interface.cc",
"btm/btm_dev.cc",
"btm/btm_devctl.cc",
"btm/btm_inq.cc",
"btm/btm_iot_config.cc",
"btm/btm_iso.cc",
"btm/btm_main.cc",
"btm/btm_scn.cc",
"btm/btm_sco.cc",
"btm/btm_sco_hci.cc",
"btm/btm_sco_hfp_hal.cc",
"btm/btm_sec.cc",
"btm/hfp_lc3_decoder.cc",
"btm/hfp_lc3_encoder.cc",
"btm/hfp_msbc_decoder.cc",
"btm/hfp_msbc_encoder.cc",
"metrics/stack_metrics_logging.cc",
"test/btm/btm_scn_test.cc",
"test/btm/peer_packet_types_test.cc",
"test/btm/sco_hci_test.cc",
"test/btm/sco_pkt_status_test.cc",
"test/btm/stack_btm_power_mode_test.cc",
"test/btm/stack_btm_regression_tests.cc",
"test/btm/stack_btm_test.cc",
"test/common/mock_eatt.cc",
"test/stack_include_test.cc",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt-sbc-decoder",
"libbt-sbc-encoder",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libbtdevice",
"libchrome",
"libevent",
"libgmock",
"liblc3",
"liblog",
"libprotobuf-cpp-lite",
"libudrv-uipc",
],
shared_libs: [
"libcrypto",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_hci",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"btm",
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
],
srcs: crypto_toolbox_srcs + [
":TestCommonMockFunctions",
"test/hci/stack_hci_test.cc",
],
static_libs: [
"libbt-common",
"libbt_shim_bridge",
"libbtdevice",
"libbte",
"libchrome",
"libgmock",
"liblog",
"libosi",
],
shared_libs: [
"libcrypto",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_hid",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/btm",
],
srcs: crypto_toolbox_srcs + [
":TestCommonMockFunctions",
":TestMockStackBtm",
":TestMockStackL2cap",
":TestMockStackMetrics",
":TestMockStackSdp",
":TestStubLegacyTrace",
"hid/hidd_api.cc",
"hid/hidd_conn.cc",
"hid/hidh_api.cc",
"hid/hidh_conn.cc",
"test/hid/stack_hid_test.cc",
],
static_libs: [
"libbluetooth-types",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libbtdevice",
"libbte",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libprotobuf-cpp-lite",
],
shared_libs: [
"libcrypto",
],
target: {
android: {
shared_libs: ["libstatssocket"],
},
},
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_btu",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestMockBta",
":TestMockBtif",
":TestMockHci",
":TestMockLegacyHciCommands",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
":TestMockStackSmp",
"btu/btu_hcif.cc",
"btu/btu_task.cc",
"test/stack_btu_test.cc",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libbtdevice",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_gatt",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":OsiCompatSources",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestMockBta",
":TestMockBtif",
":TestMockHci",
":TestMockLegacyHciCommands",
":TestMockMainShim",
":TestMockRustFfi",
":TestMockSrvcDis",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackCryptotoolbox",
":TestMockStackL2cap",
":TestMockStackSdp",
":TestMockStackSmp",
"arbiter/acl_arbiter.cc",
"eatt/eatt.cc",
"gatt/att_protocol.cc",
"gatt/connection_manager.cc",
"gatt/gatt_api.cc",
"gatt/gatt_attr.cc",
"gatt/gatt_auth.cc",
"gatt/gatt_cl.cc",
"gatt/gatt_db.cc",
"gatt/gatt_main.cc",
"gatt/gatt_sr.cc",
"gatt/gatt_sr_hash.cc",
"gatt/gatt_utils.cc",
"test/gatt/stack_gatt_test.cc",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libbtdevice",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libprotobuf-cpp-lite",
"libstatslog_bt",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
"libcutils",
],
target: {
android: {
shared_libs: ["libstatssocket"],
},
},
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_l2cap",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":OsiCompatSources",
":TestCommonLogMsg",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestMockBta",
":TestMockBtif",
":TestMockHci",
":TestMockLegacyHciCommands",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackCryptotoolbox",
":TestMockStackHcic",
":TestMockStackSdp",
":TestMockStackSmp",
"l2cap/l2c_api.cc",
"l2cap/l2c_ble.cc",
"l2cap/l2c_csm.cc",
"l2cap/l2c_fcr.cc",
"l2cap/l2c_link.cc",
"l2cap/l2c_main.cc",
"l2cap/l2c_utils.cc",
"test/stack_l2cap_test.cc",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libbtdevice",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libprotobuf-cpp-lite",
"libstatslog_bt",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
"libcutils",
],
target: {
android: {
shared_libs: [
"libPlatformProperties",
"libstatssocket",
],
},
},
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
cc_test {
name: "net_test_stack_acl",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/stack/btm",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":OsiCompatSources",
":TestCommonLogMsg",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestMockBta",
":TestMockBtif",
":TestMockDevice",
":TestMockHci",
":TestMockLegacyHciCommands",
":TestMockLegacyHciInterface",
":TestMockMainShim",
":TestMockRustFfi",
":TestMockStackBtm",
":TestMockStackBtu",
":TestMockStackCryptotoolbox",
":TestMockStackGatt",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
":TestMockStackSdp",
":TestMockStackSmp",
"acl/*.cc",
"btm/btm_iot_config.cc",
"test/stack_acl_test.cc",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libbtdevice",
"libchrome",
"libevent",
"libgmock",
"liblog",
"libosi",
"libstatslog_bt",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
],
target: {
android: {
shared_libs: ["libstatssocket"],
},
},
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined: true,
},
},
header_libs: ["libbluetooth_headers"],
}
// Bluetooth stack connection multiplexing
cc_test {
name: "net_test_stack_sdp",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"bluetooth_gtest_x86_asan_workaround",
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/device/include/",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/stack/btm",
],
srcs: [
":LegacyStackSdp",
":TestCommonLogMsg",
":TestCommonMockFunctions",
":TestMockBtif",
":TestMockOsi",
":TestMockStackBtm",
":TestMockStackL2cap",
":TestMockStackMetrics",
"test/sdp/stack_sdp_test.cc",
"test/sdp/stack_sdp_utils_test.cc",
],
shared_libs: [
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbluetooth_gd",
"libbt-common",
"libbt-platform-protos-lite",
"libbt_shim_bridge",
"libbt_shim_ffi",
"libchrome",
"libgmock",
"liblog",
],
header_libs: ["libbluetooth_headers"],
}