blob: 3db56b9d5ea1cf3411177b622d0017930c0db982 [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",
defaults: ["fluoride_defaults"],
host_supported: true,
include_dirs: [
"packages/modules/Bluetooth/system",
],
srcs: crypto_toolbox_srcs
}
// Bluetooth stack static library for target
cc_library_static {
name: "libbt-stack",
defaults: ["fluoride_basic_defaults"],
local_include_dirs: [
"include",
"avct",
"btm",
"avrc",
"l2cap",
"avdt",
"eatt",
"gatt",
"gap",
"pan",
"bnep",
"hid",
"metrics",
"sdp",
"smp",
"srvc",
],
header_libs: [
"libbluetooth_headers",
],
include_dirs: [
"external/aac/libAACenc/include",
"external/aac/libAACdec/include",
"external/aac/libSYS/include",
"external/libldac/inc",
"external/libldac/abr/inc",
"external/libopus/include",
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/vnd/include",
"packages/modules/Bluetooth/system/vnd/ble",
"packages/modules/Bluetooth/system/btif/include",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/udrv/include",
"packages/modules/Bluetooth/system/bta/include",
"packages/modules/Bluetooth/system/bta/sys",
"packages/modules/Bluetooth/system/utils/include",
"packages/modules/Bluetooth/system/gd/rust/shim",
],
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_hd.cc",
"a2dp/a2dp_vendor_aptx_encoder.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_encoder.cc",
"a2dp/a2dp_vendor_opus_decoder.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/ble_advertiser_hci_interface.cc",
"acl/acl.cc",
"acl/btm_acl.cc",
"acl/ble_acl.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",
"acl/btm_ble_connection_establishment.cc",
"btm/btm_ble_cont_energy.cc",
"btm/btm_ble_gap.cc",
"btm/btm_ble_multi_adv.cc",
"btm/btm_ble_scanner.cc",
"btm/btm_ble_privacy.cc",
"btm/btm_client_interface.cc",
"btm/btm_dev.cc",
"btm/btm_devctl.cc",
"btm/btm_inq.cc",
"btm/btm_main.cc",
"acl/btm_pm.cc",
"btm/btm_sco.cc",
"btm/btm_sco_hci.cc",
"btm/btm_iso.cc",
"btm/btm_sec.cc",
"btm/btm_scn.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",
"hid/hidh_api.cc",
"hid/hidh_conn.cc",
"hid/hidd_api.cc",
"hid/hidd_conn.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",
"pan/pan_api.cc",
"pan/pan_main.cc",
"pan/pan_utils.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",
"sdp/sdp_api.cc",
"sdp/sdp_db.cc",
"sdp/sdp_discovery.cc",
"sdp/sdp_main.cc",
"sdp/sdp_server.cc",
"sdp/sdp_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",
],
static_libs: [
"libbt-hci",
],
whole_static_libs: [
"libcom.android.sysprop.bluetooth",
"libldacBT_abr",
"libldacBT_enc",
"libaptx_enc",
"libaptxhd_enc",
],
host_supported: true,
min_sdk_version: "Tiramisu"
}
// Bluetooth stack unit tests for target
cc_test {
name: "net_test_stack",
defaults: [
"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/stack_a2dp_test.cc",
"test/stack_avrcp_test.cc",
"test/gatt/gatt_api_test.cc",
],
shared_libs: [
"android.hardware.bluetooth@1.0",
"android.hardware.bluetooth@1.1",
"android.hardware.bluetooth.audio@2.0",
"android.hardware.bluetooth.audio@2.1",
"android.hardware.bluetooth.audio-V2-ndk",
"libaaudio",
"libbinder_ndk",
"libcutils",
"libdl",
"libfmq",
"libhidlbase",
"liblog",
"libprocessgroup",
"libprotobuf-cpp-lite",
"libutils",
"libtinyxml2",
"libz",
"libcrypto",
],
static_libs: [
"android.hardware.bluetooth.a2dp@1.0",
"android.system.suspend.control-V1-ndk",
"libbt-audio-hal-interface",
"libbluetooth-dumpsys",
"libbtcore",
"libbt-bta",
"libbt-stack",
"libbt-common",
"libbt-sbc-decoder",
"libbt-sbc-encoder",
"libbt-utils",
"libbtif",
"libFraunhoferAAC",
"libbt-hci",
"libbtdevice",
"libg722codec",
"liblc3",
"libopus",
"libosi",
"libudrv-uipc",
"libbt-protos-lite",
],
whole_static_libs: [
"libbluetooth-for-tests",
],
}
cc_test {
name: "net_test_stack_rfcomm",
defaults: [
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
host_supported: true,
local_include_dirs: [
"include",
"btm",
"l2cap",
"smp",
"rfcomm",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/utils/include",
],
srcs: [
":TestCommonMockFunctions",
":TestMockHci",
":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",
],
shared_libs: [
"libcutils",
"libprotobuf-cpp-lite",
"libcrypto",
],
static_libs: [
"liblog",
"libgmock",
"libosi",
"libbt-common",
"libbt-protos-lite",
],
sanitize: {
cfi: false,
},
}
// Bluetooth stack smp unit tests for target
cc_test {
name: "net_test_stack_smp",
defaults: [
"fluoride_defaults",
"mts_defaults",
],
host_supported: true,
test_suites: ["device-tests"],
local_include_dirs: [
"include",
"btm",
"l2cap",
"smp",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/utils/include",
],
srcs: crypto_toolbox_srcs + [
":TestCommonMainHandler",
":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: [
"android.hardware.bluetooth@1.0",
"android.hardware.bluetooth@1.1",
"libcrypto",
"libcutils",
],
static_libs: [
"liblog",
"libflatbuffers-cpp",
"libgmock",
"libosi",
],
}
// Bluetooth stack multi-advertising unit tests for target
cc_test {
name: "net_test_stack_multi_adv",
defaults: [
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
local_include_dirs: [
"include",
"btm",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/utils/include",
],
srcs: [
":TestMockDevice",
"btm/btm_ble_multi_adv.cc",
"test/ble_advertiser_test.cc",
],
shared_libs: [
"android.hardware.bluetooth@1.0",
"android.hardware.bluetooth@1.1",
"libbinder_ndk",
"libcrypto",
"libcutils",
],
static_libs: [
"android.system.suspend.control-V1-ndk",
"libbluetooth-types",
"liblog",
"libgmock",
],
sanitize: {
cfi: false,
},
}
// Bluetooth stack advertise data parsing unit tests for target
cc_test {
name: "net_test_stack_ad_parser",
defaults: [
"fluoride_defaults",
"mts_defaults",
],
test_suites: ["device-tests"],
local_include_dirs: [
"include",
],
srcs: [
"test/ad_parser_unittest.cc",
],
shared_libs: [
"android.hardware.bluetooth@1.0",
"android.hardware.bluetooth@1.1",
"libbinder_ndk",
"libcrypto",
],
static_libs: [
"android.system.suspend.control-V1-ndk",
"libbluetooth-types",
"liblog",
"libgmock",
],
}
// Bluetooth stack connection multiplexing
cc_test {
name: "net_test_gatt_conn_multiplexing",
defaults: [
"fluoride_defaults",
"mts_defaults",
],
host_supported: true,
test_suites: ["general-tests"],
local_include_dirs: [
"include",
"btm",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include",
"packages/modules/Bluetooth/system/utils/include",
],
srcs: [
"gatt/connection_manager.cc",
"test/common/mock_btm_api_layer.cc",
"test/gatt_connection_manager_test.cc",
":TestCommonMainHandler",
],
shared_libs: [
"libcutils",
],
static_libs: [
"libbluetooth-types",
"libbt-common",
"liblog",
"libgmock",
],
sanitize: {
cfi: false,
},
}
cc_test {
name: "net_test_stack_gatt_native",
defaults: [
"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/include",
"packages/modules/Bluetooth/system/stack/eatt",
"packages/modules/Bluetooth/system/stack/l2cap",
"packages/modules/Bluetooth/system/stack/btm",
"packages/modules/Bluetooth/system/utils/include",
],
srcs: [
":TestMockStackBtm",
"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: [
"libcutils",
"libprotobuf-cpp-lite",
"libcrypto",
],
static_libs: [
"liblog",
"libosi",
"libbt-common",
"libbt-protos-lite",
"libgmock",
"libosi-AllocationTestHarness",
],
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
}
cc_test {
name: "net_test_stack_avdtp",
defaults: [
"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",
"packages/modules/Bluetooth/system/utils/include",
],
srcs: [
"test/stack_avdtp_test.cc",
"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",
":TestMockStackL2cap",
":TestMockStackAcl",
":TestMockStackA2dp",
":TestMockBta",
":TestMockDevice",
],
shared_libs: [
"libcrypto",
"libcutils",
"libprotobuf-cpp-lite",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"liblog",
"libosi",
"libosi-AllocationTestHarness",
],
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
}
cc_test {
name: "net_test_stack_a2dp_codecs_native",
defaults: [
"fluoride_defaults",
"mts_defaults",
],
cflags: [
"-DUNIT_TESTS",
],
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
include_dirs: [
"external/aac/libAACenc/include",
"external/aac/libAACdec/include",
"external/aac/libSYS/include",
"external/libldac/inc",
"external/libldac/abr/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",
"packages/modules/Bluetooth/system/utils/include",
],
target: {
host: {
srcs: [
":BluetoothHostTestingLogCapture",
],
},
android: {
srcs: [
":BluetoothAndroidTestingLogCapture",
],
test_config: "test/a2dp/AndroidTest.xml",
}
},
data: [
"test/a2dp/raw_data/*",
],
srcs: [
"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_hd.cc",
"a2dp/a2dp_vendor_aptx_encoder.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_encoder.cc",
"a2dp/a2dp_vendor_opus_decoder.cc",
"test/a2dp/a2dp_aac_unittest.cc",
"test/a2dp/a2dp_sbc_unittest.cc",
"test/a2dp/a2dp_opus_unittest.cc",
"test/a2dp/a2dp_vendor_ldac_unittest.cc",
"test/a2dp/mock_bta_av_codec.cc",
"test/a2dp/test_util.cc",
"test/a2dp/wav_reader.cc",
"test/a2dp/wav_reader_unittest.cc",
":TestMockBta",
":TestMockStackA2dpApi",
],
shared_libs: [
"libcrypto",
"libcutils",
"libprotobuf-cpp-lite",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"libbt-sbc-decoder",
"libbt-sbc-encoder",
"libFraunhoferAAC",
"libgmock",
"liblog",
"libopus",
"libosi",
"libosi-AllocationTestHarness",
],
whole_static_libs: [
"libaptx_enc",
"libaptxhd_enc",
"libldacBT_abr",
"libldacBT_enc",
],
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
}
cc_test {
name: "net_test_stack_a2dp_native",
defaults: [
"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",
"libprotobuf-cpp-lite",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"liblog",
"libosi",
"libosi-AllocationTestHarness",
],
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
}
// gatt sr hash test
cc_test {
name: "net_test_stack_gatt_sr_hash_native",
defaults: [
"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",
"packages/modules/Bluetooth/system/utils/include",
],
srcs: crypto_toolbox_srcs + [
":TestCommonMainHandler",
":TestMockStackBtm",
"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: [
"libcutils",
"libcrypto",
"libprotobuf-cpp-lite",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"liblog",
"libgmock",
"libosi",
],
}
// Iso manager unit tests
cc_test {
name: "net_test_btm_iso",
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
defaults: [
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"btm",
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
],
srcs: [
"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",
":TestCommonStackConfig"
],
static_libs: [
"libbt-common",
"libgmock",
"liblog",
"libosi",
],
sanitize: {
cfi: true,
scs: true,
address: true,
all_undefined: true,
integer_overflow: true,
diag: {
undefined : true
},
},
}
// EATT unit tests
cc_test {
name: "net_test_eatt",
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
defaults: [
"fluoride_defaults",
"clang_coverage_bin",
"mts_defaults",
],
local_include_dirs: [
"include",
"btm",
"eatt",
"gatt",
"l2cap",
"test/common",
],
include_dirs:[
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/internal_include"
],
srcs: [
"eatt/eatt.cc",
"test/common/mock_btm_api_layer.cc",
"test/common/mock_btif_storage.cc",
"test/common/mock_controller.cc",
"test/common/mock_gatt_layer.cc",
"test/common/mock_l2cap_layer.cc",
"test/gatt/mock_gatt_utils_ref.cc",
"test/eatt/eatt_test.cc",
":TestCommonMainHandler",
":TestCommonStackConfig",
],
shared_libs: [
"libcutils",
"libcrypto",
"libprotobuf-cpp-lite",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"liblog",
"libgmock",
"libosi",
],
sanitize: {
cfi: false,
},
}
cc_test {
name: "net_test_stack_btm",
test_suites: ["device-tests"],
host_supported: true,
test_options: {
unit_test: true,
},
defaults: [
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"btm",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/vnd/ble",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: crypto_toolbox_srcs + [
":BluetoothBtaaSources_host",
":BluetoothHalSources_hci_host",
":BluetoothOsSources_host",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestMockBta",
":TestMockBtif",
":TestMockDevice",
":TestMockLegacyHciInterface",
":TestMockMainBte",
":TestMockMainShim",
":TestMockStackBtu",
":TestMockStackGap",
":TestMockStackGatt",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackSmp",
"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_multi_adv.cc",
"btm/btm_ble_scanner.cc",
"btm/btm_ble_privacy.cc",
"btm/btm_client_interface.cc",
"btm/btm_dev.cc",
"btm/btm_devctl.cc",
"btm/btm_inq.cc",
"btm/btm_iso.cc",
"btm/btm_main.cc",
"btm/btm_sco.cc",
"btm/btm_sco_hci.cc",
"btm/btm_scn.cc",
"btm/btm_sec.cc",
"metrics/stack_metrics_logging.cc",
"test/btm/stack_btm_test.cc",
"test/btm/stack_btm_regression_tests.cc",
"test/btm/peer_packet_types_test.cc",
"test/common/mock_eatt.cc",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"libbtdevice",
"libbt-utils",
"libflatbuffers-cpp",
"libgmock",
"liblog",
"libosi",
"libudrv-uipc",
],
shared_libs: [
"libcrypto",
"libprotobuf-cpp-lite",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined : true
},
},
}
cc_test {
name: "net_test_stack_hci",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"btm",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
"packages/modules/Bluetooth/system/vnd/ble",
],
srcs: crypto_toolbox_srcs + [
"test/hci/stack_hci_test.cc",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"libbte",
"libgmock",
"liblog",
"libosi",
"libbtdevice",
],
shared_libs: [
"libprotobuf-cpp-lite",
"libcrypto",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined : true
},
},
}
cc_test {
name: "net_test_stack_hid",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
],
srcs: crypto_toolbox_srcs + [
":TestMockStackL2cap",
":TestMockStackSdp",
":TestMockStackBtm",
":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: [
"libbt-common",
"libbt-protos-lite",
"libbtdevice",
"libbte",
"libgmock",
"liblog",
"libosi",
],
shared_libs: [
"libcrypto",
"libprotobuf-cpp-lite",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined : true
},
},
}
cc_test {
name: "net_test_stack_btu",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"fluoride_defaults",
"mts_defaults",
],
local_include_dirs: [
"include",
"test/common",
],
include_dirs: [
"packages/modules/Bluetooth/system",
"packages/modules/Bluetooth/system/gd",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":TestMockBta",
":TestMockBtif",
":TestMockHci",
":TestMockLegacyHciCommands",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackL2cap",
":TestMockStackHcic",
":TestMockStackMetrics",
":TestMockStackSmp",
"btu/btu_hcif.cc",
"btu/btu_task.cc",
"test/stack_btu_test.cc",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"libbtdevice",
"libflatbuffers-cpp",
"libgmock",
"liblog",
"libosi",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
"libprotobuf-cpp-lite",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined : true
},
},
}
cc_test {
name: "net_test_stack_gatt",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"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/utils/include",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":OsiCompatSources",
":TestCommonMainHandler",
":TestCommonStackConfig",
":TestMockBta",
":TestMockBtif",
":TestMockHci",
":TestMockLegacyHciCommands",
":TestMockMainShim",
":TestMockStackAcl",
":TestMockStackBtm",
":TestMockStackCryptotoolbox",
":TestMockStackL2cap",
":TestMockStackSdp",
":TestMockStackSmp",
"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: [
"libbt-common",
"libbt-protos-lite",
"libbtdevice",
"libflatbuffers-cpp",
"libgmock",
"liblog",
"libosi",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
"libprotobuf-cpp-lite",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined : true
},
},
}
cc_test {
name: "net_test_stack_l2cap",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"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/utils/include",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":OsiCompatSources",
":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: [
"libbt-common",
"libbt-protos-lite",
"libbtdevice",
"libflatbuffers-cpp",
"libgmock",
"liblog",
"libosi",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
"libprotobuf-cpp-lite",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined : true
},
},
}
cc_test {
name: "net_test_stack_acl",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"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/utils/include",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":OsiCompatSources",
":TestCommonMainHandler",
":TestCommonMockFunctions",
":TestCommonStackConfig",
":TestMockBta",
":TestMockBtif",
":TestMockDevice",
":TestMockHci",
":TestMockLegacyHciCommands",
":TestMockLegacyHciInterface",
":TestMockMainShim",
":TestMockStackBtm",
":TestMockStackBtu",
":TestMockStackCryptotoolbox",
":TestMockStackGatt",
":TestMockStackHcic",
":TestMockStackL2cap",
":TestMockStackMetrics",
":TestMockStackSdp",
":TestMockStackSmp",
"acl/*.cc",
"test/stack_acl_test.cc",
],
static_libs: [
"libbt-common",
"libbt-protos-lite",
"libflatbuffers-cpp",
"libgmock",
"liblog",
"libosi",
],
shared_libs: [
"libbinder_ndk",
"libcrypto",
"libprotobuf-cpp-lite",
],
sanitize: {
address: true,
all_undefined: true,
cfi: true,
integer_overflow: true,
scs: true,
diag: {
undefined : true
},
},
}
// Bluetooth stack connection multiplexing
cc_test {
name: "net_test_stack_sdp",
test_suites: ["device-tests"],
host_supported: true,
defaults: [
"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/utils/include",
],
srcs: [
":TestCommonMockFunctions",
":TestMockBtif",
":TestMockOsi",
":TestMockStackL2cap",
":TestMockStackMetrics",
"sdp/sdp_api.cc",
"sdp/sdp_discovery.cc",
"sdp/sdp_server.cc",
"sdp/sdp_db.cc",
"sdp/sdp_main.cc",
"sdp/sdp_utils.cc",
"test/sdp/stack_sdp_test.cc",
"test/sdp/stack_sdp_utils_test.cc",
],
shared_libs: [
"libcutils",
],
static_libs: [
"libbt-common",
"libbluetooth-types",
"liblog",
"libgmock",
],
}