blob: b91db34a671b4788c44995088c6ba2bc9e3e87eb [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
default_applicable_licenses: ["system_bt_license"],
}
cc_defaults {
name: "fluoride_bta_defaults",
defaults: ["fluoride_defaults"],
local_include_dirs: [
"include",
"sys",
"dm",
"hd",
"hh",
],
include_dirs: [
"system/bt",
"system/bt/bta/include",
"system/bt/btcore/include",
"system/bt/btif/avrcp",
"system/bt/btif/include",
"system/bt/gd",
"system/bt/hci/include",
"system/bt/internal_include",
"system/bt/stack/include",
"system/bt/stack/btm",
"system/bt/udrv/include",
"system/bt/vnd/include",
"system/bt/utils/include",
"system/bt/gd/rust/shim",
],
shared_libs: [
"libcutils",
],
header_libs: ["libbluetooth_headers"],
cflags: ["-DBUILDCFG"],
}
filegroup {
name: "BtaDmSources",
srcs: [
"dm/bta_dm_act.cc",
"dm/bta_dm_api.cc",
"dm/bta_dm_cfg.cc",
"dm/bta_dm_ci.cc",
"dm/bta_dm_main.cc",
"dm/bta_dm_pm.cc",
],
}
// BTA static library for target
cc_library_static {
name: "libbt-bta",
defaults: ["fluoride_bta_defaults"],
srcs: [
":BtaDmSources",
"ag/bta_ag_act.cc",
"ag/bta_ag_api.cc",
"ag/bta_ag_at.cc",
"ag/bta_ag_cfg.cc",
"ag/bta_ag_cmd.cc",
"ag/bta_ag_main.cc",
"ag/bta_ag_rfc.cc",
"ag/bta_ag_sco.cc",
"ag/bta_ag_sdp.cc",
"ar/bta_ar.cc",
"av/bta_av_aact.cc",
"av/bta_av_act.cc",
"av/bta_av_api.cc",
"av/bta_av_cfg.cc",
"av/bta_av_ci.cc",
"av/bta_av_main.cc",
"av/bta_av_ssm.cc",
"csis/csis_client.cc",
"gatt/bta_gattc_act.cc",
"gatt/bta_gattc_api.cc",
"gatt/bta_gattc_cache.cc",
"gatt/bta_gattc_main.cc",
"gatt/bta_gattc_queue.cc",
"gatt/bta_gattc_utils.cc",
"gatt/bta_gatts_act.cc",
"gatt/bta_gatts_api.cc",
"gatt/bta_gatts_main.cc",
"gatt/bta_gatts_utils.cc",
"gatt/database.cc",
"gatt/database_builder.cc",
"groups/groups.cc",
"vc/device.cc",
"vc/vc.cc",
"le_audio/client.cc",
"le_audio/devices.cc",
"le_audio/hal_verifier.cc",
"le_audio/state_machine.cc",
"le_audio/client_parser.cc",
"le_audio/client_audio.cc",
"le_audio/le_audio_types.cc",
"hearing_aid/hearing_aid.cc",
"hearing_aid/hearing_aid_audio_source.cc",
"hf_client/bta_hf_client_act.cc",
"hf_client/bta_hf_client_api.cc",
"hf_client/bta_hf_client_at.cc",
"hf_client/bta_hf_client_main.cc",
"hf_client/bta_hf_client_rfc.cc",
"hf_client/bta_hf_client_sco.cc",
"hf_client/bta_hf_client_sdp.cc",
"hh/bta_hh_act.cc",
"hh/bta_hh_api.cc",
"hh/bta_hh_cfg.cc",
"hh/bta_hh_le.cc",
"hh/bta_hh_main.cc",
"hh/bta_hh_utils.cc",
"hd/bta_hd_act.cc",
"hd/bta_hd_api.cc",
"hd/bta_hd_main.cc",
"jv/bta_jv_act.cc",
"jv/bta_jv_api.cc",
"jv/bta_jv_cfg.cc",
"pan/bta_pan_act.cc",
"pan/bta_pan_api.cc",
"pan/bta_pan_ci.cc",
"pan/bta_pan_main.cc",
"sdp/bta_sdp.cc",
"sdp/bta_sdp_act.cc",
"sdp/bta_sdp_api.cc",
"sdp/bta_sdp_cfg.cc",
"sys/bta_sys_conn.cc",
"sys/bta_sys_main.cc",
"sys/utl.cc",
],
static_libs: [
"avrcp-target-service",
"lib-bt-packets",
],
shared_libs: [
"android.hardware.bluetooth.audio@2.0",
"android.hardware.bluetooth.audio@2.1",
],
host_supported: true,
}
// bta unit tests for target
cc_test {
name: "net_test_bta",
defaults: ["fluoride_bta_defaults"],
test_suites: ["device-tests"],
srcs: [
":TestMockStackBtm",
":TestCommonMockFunctions",
"test/bta_hf_client_test.cc",
"test/bta_dm_cust_uuid_test.cc",
"test/bta_dip_test.cc",
"test/gatt/database_builder_test.cc",
"test/gatt/database_builder_sample_device_test.cc",
"test/gatt/database_test.cc",
],
shared_libs: [
"libcrypto",
"liblog",
"libprotobuf-cpp-lite",
],
static_libs: [
"crypto_toolbox_for_tests",
"libbtcore",
"libbt-bta",
"libbt-audio-hal-interface",
"libbluetooth-types",
"libbt-protos-lite",
"libosi",
"libbt-common",
],
}
cc_test {
name: "bt_host_test_bta",
defaults: ["fluoride_bta_defaults"],
test_suites: ["device-tests"],
host_supported: true,
include_dirs: [
"system/bt",
"system/bt/gd",
],
generated_headers: [
"BluetoothGeneratedDumpsysDataSchema_h",
"BluetoothGeneratedPackets_h",
],
srcs: [
":OsiCompatSources",
":TestCommonMainHandler",
":TestMockBtif",
":TestMockDevice",
":TestMockMainShim",
":TestMockOsi",
":TestMockStack",
"ar/bta_ar.cc",
"dm/bta_dm_api.cc",
"dm/bta_dm_act.cc",
"dm/bta_dm_cfg.cc",
"dm/bta_dm_ci.cc",
"dm/bta_dm_main.cc",
"dm/bta_dm_pm.cc",
"gatt/bta_gattc_act.cc",
"gatt/bta_gattc_api.cc",
"gatt/bta_gattc_cache.cc",
"gatt/bta_gattc_main.cc",
"gatt/bta_gattc_queue.cc",
"gatt/bta_gattc_utils.cc",
"gatt/database.cc",
"gatt/database_builder.cc",
"hh/bta_hh_act.cc",
"hh/bta_hh_api.cc",
"hh/bta_hh_cfg.cc",
"hh/bta_hh_le.cc",
"hh/bta_hh_main.cc",
"hh/bta_hh_utils.cc",
"pan/bta_pan_act.cc",
"pan/bta_pan_api.cc",
"pan/bta_pan_main.cc",
"sys/bta_sys_conn.cc",
"sys/bta_sys_main.cc",
"test/bta_dm_test.cc",
"test/bta_gatt_test.cc",
"test/bta_pan_test.cc",
],
shared_libs: [
"libcrypto",
"libflatbuffers-cpp",
"liblog",
"libprotobuf-cpp-lite",
],
static_libs: [
"libbluetooth-types",
"libbt-common",
"libbt-protos-lite",
"libbtcore",
"libgmock",
],
sanitize: {
address: true,
cfi: true,
misc_undefined: ["bounds"],
},
}
// bta hf client add record tests for target
cc_test {
name: "net_test_hf_client_add_record",
defaults: ["fluoride_defaults"],
test_suites: ["device-tests"],
include_dirs: [
"system/bt",
"system/bt/gd",
"system/bt/bta/include",
"system/bt/bta/sys",
"system/bt/btif/include",
"system/bt/internal_include",
"system/bt/stack/include",
"system/bt/utils/include",
],
srcs: [
"test/bta_hf_client_add_record_test.cc",
],
header_libs: ["libbluetooth_headers"],
shared_libs: [
"libcutils",
"liblog",
],
static_libs: [
"libbluetooth-types",
"libosi",
],
cflags: ["-DBUILDCFG"],
}
// csis unit tests for host
cc_test {
name: "bluetooth_csis_test",
test_suites: ["device-tests"],
defaults: [
"fluoride_bta_defaults",
"clang_coverage_bin",
],
host_supported: true,
include_dirs: [
"system/bt",
"system/bt/bta/groups",
"system/bt/bta/include",
"system/bt/bta/test/common",
"system/bt/btif/include",
"system/bt/osi/include",
],
srcs : [
":TestMockBtif",
"csis/csis_client.cc",
"csis/csis_client_test.cc",
"groups/groups.cc",
"gatt/database.cc",
"gatt/database_builder.cc",
"test/common/bta_dm_api_mock.cc",
"test/common/bta_gatt_api_mock.cc",
"test/common/bta_gatt_queue_mock.cc",
"test/common/btm_api_mock.cc",
],
shared_libs: [
"libprotobuf-cpp-lite",
"libcrypto",
],
static_libs : [
"crypto_toolbox_for_tests",
"libgmock",
"libbt-common",
"libbt-protos-lite",
"libosi",
],
sanitize: {
cfi: true,
scs: true,
address: true,
all_undefined: true,
integer_overflow: true,
diag: {
undefined : true
},
},
}
// groups unit tests for host
cc_test {
name: "bluetooth_groups_test",
test_suites: ["device-tests"],
defaults: [
"fluoride_bta_defaults",
"clang_coverage_bin",
],
host_supported: true,
include_dirs: [
"system/bt",
"system/bt/bta/include",
],
srcs : [
":TestMockBtif",
"groups/groups_test.cc",
"groups/groups.cc",
],
shared_libs: [
"libprotobuf-cpp-lite",
"libcrypto",
],
static_libs : [
"crypto_toolbox_for_tests",
"libgmock",
"libbt-common",
"libbt-protos-lite",
"libosi",
],
sanitize: {
cfi: true,
scs: true,
address: true,
all_undefined: true,
integer_overflow: true,
diag: {
undefined : true
},
},
}
// bta unit tests for host
cc_test {
name: "bluetooth_vc_test",
test_suites: ["device-tests"],
defaults: [
"fluoride_bta_defaults",
"clang_coverage_bin",
],
host_supported: true,
include_dirs: [
"system/bt",
"system/bt/bta/include",
"system/bt/bta/test/common",
"system/bt/stack/include",
],
srcs : [
":TestMockOsi",
"gatt/database.cc",
"gatt/database_builder.cc",
"test/common/bta_gatt_api_mock.cc",
"test/common/bta_gatt_queue_mock.cc",
"test/common/mock_csis_client.cc",
"test/common/btm_api_mock.cc",
"vc/devices_test.cc",
"vc/device.cc",
"vc/vc.cc",
"vc/vc_test.cc",
],
shared_libs: [
"libprotobuf-cpp-lite",
"libcrypto",
],
static_libs : [
"crypto_toolbox_for_tests",
"libgmock",
"libbt-common",
"libbt-protos-lite",
"libosi"
],
sanitize: {
cfi: false,
},
}
// bta unit tests for LE Audio
// ========================================================
cc_test {
name: "bluetooth_le_audio_test",
test_suites: ["device-tests"],
defaults: [
"fluoride_defaults",
"clang_coverage_bin",
],
host_supported: true,
include_dirs: [
"system/bt",
"system/bt/bta/include",
"system/bt/bta/test/common",
"system/bt/btif/include",
"system/bt/gd",
"system/bt/stack/include",
],
srcs : [
":TestStubOsi",
"test/common/bta_gatt_api_mock.cc",
"test/common/bta_gatt_queue_mock.cc",
"test/common/btm_api_mock.cc",
"le_audio/client_audio.cc",
"le_audio/client_audio_test.cc",
"le_audio/client_parser.cc",
"le_audio/client_parser_test.cc",
"le_audio/devices.cc",
"le_audio/devices_test.cc",
"le_audio/le_audio_types.cc",
"le_audio/le_audio_types_test.cc",
"le_audio/mock_iso_manager.cc",
"test/common/mock_controller.cc",
"le_audio/state_machine.cc",
"le_audio/state_machine_test.cc"
],
shared_libs: [
"libprotobuf-cpp-lite",
"libcrypto",
"liblog", // __android_log_print
],
static_libs : [
"libgmock",
"libbt-common",
"libbt-protos-lite",
"libosi",
],
sanitize: {
cfi: false,
},
}
cc_test {
name: "bluetooth_le_audio_client_test",
test_suites: ["device-tests"],
defaults: [
"fluoride_bta_defaults",
"clang_coverage_bin",
],
host_supported: true,
include_dirs: [
"system/bt",
"system/bt/bta/include",
"system/bt/bta/test/common",
"system/bt/stack/include",
],
srcs : [
":TestMockBtaLeAudioHalVerifier",
"gatt/database.cc",
"gatt/database_builder.cc",
"le_audio/client.cc",
"le_audio/client_parser.cc",
"le_audio/devices.cc",
"le_audio/le_audio_client_test.cc",
"le_audio/le_audio_types.cc",
"le_audio/mock_iso_manager.cc",
"le_audio/mock_le_audio_client_audio.cc",
"le_audio/mock_state_machine.cc",
"test/common/btm_api_mock.cc",
"test/common/bta_gatt_api_mock.cc",
"test/common/bta_gatt_queue_mock.cc",
"test/common/btif_storage_mock.cc",
"test/common/mock_csis_client.cc",
"test/common/mock_controller.cc",
"test/common/mock_device_groups.cc",
],
shared_libs: [
"android.hardware.bluetooth.audio@2.0",
"android.hardware.bluetooth.audio@2.1",
"libprotobuf-cpp-lite",
"libcrypto",
"liblog",
],
static_libs : [
"crypto_toolbox_for_tests",
"libgmock",
"libbt-common",
"libbt-protos-lite",
"libosi",
"liblc3codec",
],
sanitize: {
cfi: true,
scs: true,
address: true,
all_undefined: true,
integer_overflow: true,
diag: {
undefined : true
},
},
}