Bob Badour | 92ecf7c | 2021-02-12 18:05:29 -0800 | [diff] [blame] | 1 | package { |
| 2 | // See: http://go/android-license-faq |
| 3 | // A large-scale-change added 'default_applicable_licenses' to import |
| 4 | // all of the 'license_kinds' from "system_bt_license" |
| 5 | // to get the below license kinds: |
| 6 | // SPDX-license-identifier-Apache-2.0 |
| 7 | default_applicable_licenses: ["system_bt_license"], |
| 8 | } |
| 9 | |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 10 | cc_defaults { |
| 11 | name: "fluoride_bta_defaults", |
William Escande | ae01e9b | 2022-03-10 12:48:12 +0000 | [diff] [blame] | 12 | defaults: ["fluoride_basic_defaults"], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 13 | local_include_dirs: [ |
| 14 | "include", |
| 15 | "sys", |
| 16 | "dm", |
| 17 | "hd", |
| 18 | "hh", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 19 | ], |
| 20 | include_dirs: [ |
| 21 | "packages/modules/Bluetooth/system", |
| 22 | "packages/modules/Bluetooth/system/bta/include", |
Ajay Panicker | 0ad702c | 2018-03-16 17:13:50 -0700 | [diff] [blame] | 23 | "packages/modules/Bluetooth/system/btif/avrcp", |
Jack He | 483217b | 2017-10-21 01:35:57 -0700 | [diff] [blame] | 24 | "packages/modules/Bluetooth/system/btif/include", |
Chris Manton | 131f21c | 2021-06-08 17:38:06 -0700 | [diff] [blame] | 25 | "packages/modules/Bluetooth/system/gd", |
Jakub Pawlowski | 9e9eb4b | 2017-10-17 16:40:41 -0700 | [diff] [blame] | 26 | "packages/modules/Bluetooth/system/internal_include", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 27 | "packages/modules/Bluetooth/system/stack/include", |
| 28 | "packages/modules/Bluetooth/system/stack/btm", |
| 29 | "packages/modules/Bluetooth/system/udrv/include", |
| 30 | "packages/modules/Bluetooth/system/vnd/include", |
| 31 | "packages/modules/Bluetooth/system/utils/include", |
Zach Johnson | 22761ec | 2020-12-21 18:14:30 -0800 | [diff] [blame] | 32 | "packages/modules/Bluetooth/system/gd/rust/shim", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 33 | ], |
Jakub Pawlowski | a75a654 | 2017-10-19 00:26:09 -0700 | [diff] [blame] | 34 | header_libs: ["libbluetooth_headers"], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 35 | cflags: ["-DBUILDCFG"], |
| 36 | } |
| 37 | |
Chris Manton | a9c16c8 | 2021-07-08 08:22:48 -0700 | [diff] [blame] | 38 | filegroup { |
| 39 | name: "BtaDmSources", |
| 40 | srcs: [ |
| 41 | "dm/bta_dm_act.cc", |
| 42 | "dm/bta_dm_api.cc", |
| 43 | "dm/bta_dm_cfg.cc", |
| 44 | "dm/bta_dm_ci.cc", |
| 45 | "dm/bta_dm_main.cc", |
| 46 | "dm/bta_dm_pm.cc", |
| 47 | ], |
| 48 | } |
| 49 | |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 50 | // BTA static library for target |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 51 | cc_library_static { |
| 52 | name: "libbt-bta", |
| 53 | defaults: ["fluoride_bta_defaults"], |
| 54 | srcs: [ |
Chris Manton | a9c16c8 | 2021-07-08 08:22:48 -0700 | [diff] [blame] | 55 | ":BtaDmSources", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 56 | "ag/bta_ag_act.cc", |
| 57 | "ag/bta_ag_api.cc", |
| 58 | "ag/bta_ag_at.cc", |
| 59 | "ag/bta_ag_cfg.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 60 | "ag/bta_ag_cmd.cc", |
| 61 | "ag/bta_ag_main.cc", |
| 62 | "ag/bta_ag_rfc.cc", |
| 63 | "ag/bta_ag_sco.cc", |
| 64 | "ag/bta_ag_sdp.cc", |
| 65 | "ar/bta_ar.cc", |
| 66 | "av/bta_av_aact.cc", |
| 67 | "av/bta_av_act.cc", |
| 68 | "av/bta_av_api.cc", |
| 69 | "av/bta_av_cfg.cc", |
| 70 | "av/bta_av_ci.cc", |
| 71 | "av/bta_av_main.cc", |
| 72 | "av/bta_av_ssm.cc", |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 73 | "csis/csis_client.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 74 | "gatt/bta_gattc_act.cc", |
| 75 | "gatt/bta_gattc_api.cc", |
| 76 | "gatt/bta_gattc_cache.cc", |
Jakub Pawlowski | 1ed87e9 | 2022-04-08 15:54:13 +0200 | [diff] [blame] | 77 | "gatt/bta_gattc_db_storage.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 78 | "gatt/bta_gattc_main.cc", |
Jakub Pawlowski | 19d0aae | 2017-11-29 21:49:32 -0800 | [diff] [blame] | 79 | "gatt/bta_gattc_queue.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 80 | "gatt/bta_gattc_utils.cc", |
| 81 | "gatt/bta_gatts_act.cc", |
| 82 | "gatt/bta_gatts_api.cc", |
| 83 | "gatt/bta_gatts_main.cc", |
sravan voleti | 898c063 | 2022-03-10 09:00:24 +0100 | [diff] [blame] | 84 | "gatt/bta_gatts_queue.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 85 | "gatt/bta_gatts_utils.cc", |
Jakub Pawlowski | 6d3cb11 | 2018-04-18 07:31:30 -0700 | [diff] [blame] | 86 | "gatt/database.cc", |
| 87 | "gatt/database_builder.cc", |
Łukasz Rymanowski | a6b8333 | 2020-12-13 07:12:57 +0000 | [diff] [blame] | 88 | "groups/groups.cc", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 89 | "vc/device.cc", |
| 90 | "vc/vc.cc", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 91 | "le_audio/broadcaster/broadcaster.cc", |
| 92 | "le_audio/broadcaster/broadcaster_types.cc", |
| 93 | "le_audio/broadcaster/state_machine.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 94 | "le_audio/client.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 95 | "le_audio/codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 96 | "le_audio/devices.cc", |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 97 | "le_audio/hal_verifier.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 98 | "le_audio/state_machine.cc", |
| 99 | "le_audio/client_parser.cc", |
| 100 | "le_audio/client_audio.cc", |
Jakub Tyszkowski | e82b512 | 2022-01-18 18:38:06 +0000 | [diff] [blame] | 101 | "le_audio/le_audio_set_configuration_provider.cc", |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 102 | "le_audio/le_audio_set_configuration_provider_json.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 103 | "le_audio/le_audio_types.cc", |
Josh Wu | c033a16 | 2022-05-05 01:29:04 -0700 | [diff] [blame^] | 104 | "le_audio/metrics_collector.cc", |
Jakub Tyszkowski | b87fc99 | 2021-04-08 15:08:35 +0000 | [diff] [blame] | 105 | "has/has_client.cc", |
| 106 | "has/has_ctp.cc", |
| 107 | "has/has_journal.cc", |
| 108 | "has/has_preset.cc", |
| 109 | "has/has_types.cc", |
Jakub Pawlowski | 7d06e57 | 2018-02-28 22:44:42 -0800 | [diff] [blame] | 110 | "hearing_aid/hearing_aid.cc", |
Hansong Zhang | d19e027 | 2018-01-19 12:23:57 -0800 | [diff] [blame] | 111 | "hearing_aid/hearing_aid_audio_source.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 112 | "hf_client/bta_hf_client_act.cc", |
| 113 | "hf_client/bta_hf_client_api.cc", |
| 114 | "hf_client/bta_hf_client_at.cc", |
| 115 | "hf_client/bta_hf_client_main.cc", |
| 116 | "hf_client/bta_hf_client_rfc.cc", |
| 117 | "hf_client/bta_hf_client_sco.cc", |
| 118 | "hf_client/bta_hf_client_sdp.cc", |
| 119 | "hh/bta_hh_act.cc", |
| 120 | "hh/bta_hh_api.cc", |
| 121 | "hh/bta_hh_cfg.cc", |
| 122 | "hh/bta_hh_le.cc", |
| 123 | "hh/bta_hh_main.cc", |
| 124 | "hh/bta_hh_utils.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 125 | "hd/bta_hd_act.cc", |
| 126 | "hd/bta_hd_api.cc", |
| 127 | "hd/bta_hd_main.cc", |
| 128 | "jv/bta_jv_act.cc", |
| 129 | "jv/bta_jv_api.cc", |
| 130 | "jv/bta_jv_cfg.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 131 | "pan/bta_pan_act.cc", |
| 132 | "pan/bta_pan_api.cc", |
| 133 | "pan/bta_pan_ci.cc", |
| 134 | "pan/bta_pan_main.cc", |
| 135 | "sdp/bta_sdp.cc", |
| 136 | "sdp/bta_sdp_act.cc", |
| 137 | "sdp/bta_sdp_api.cc", |
| 138 | "sdp/bta_sdp_cfg.cc", |
| 139 | "sys/bta_sys_conn.cc", |
| 140 | "sys/bta_sys_main.cc", |
| 141 | "sys/utl.cc", |
| 142 | ], |
Ajay Panicker | 0ad702c | 2018-03-16 17:13:50 -0700 | [diff] [blame] | 143 | static_libs: [ |
| 144 | "avrcp-target-service", |
| 145 | "lib-bt-packets", |
| 146 | ], |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 147 | generated_headers: [ |
| 148 | "LeAudioSetConfigSchemas_h", |
| 149 | ], |
Hansong Zhang | 777b634 | 2021-02-23 15:52:11 -0800 | [diff] [blame] | 150 | host_supported: true, |
ahujapalash | 5add3d5 | 2022-03-10 18:38:02 +0000 | [diff] [blame] | 151 | min_sdk_version: "Tiramisu" |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 152 | } |
| 153 | |
| 154 | // bta unit tests for target |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 155 | cc_test { |
| 156 | name: "net_test_bta", |
| 157 | defaults: ["fluoride_bta_defaults"], |
Yanfei Zhou | d243981 | 2018-08-28 10:58:52 +0800 | [diff] [blame] | 158 | test_suites: ["device-tests"], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 159 | srcs: [ |
Chris Manton | 8fe4751 | 2021-09-24 13:30:54 -0700 | [diff] [blame] | 160 | ":TestMockStackBtm", |
| 161 | ":TestCommonMockFunctions", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 162 | "test/bta_hf_client_test.cc", |
Yanfei Zhou | d243981 | 2018-08-28 10:58:52 +0800 | [diff] [blame] | 163 | "test/bta_dm_cust_uuid_test.cc", |
Fei Zheng | a6d4be1 | 2019-12-25 10:45:51 +0800 | [diff] [blame] | 164 | "test/bta_dip_test.cc", |
Jakub Pawlowski | 6d3cb11 | 2018-04-18 07:31:30 -0700 | [diff] [blame] | 165 | "test/gatt/database_builder_test.cc", |
| 166 | "test/gatt/database_builder_sample_device_test.cc", |
| 167 | "test/gatt/database_test.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 168 | ], |
| 169 | shared_libs: [ |
William Escande | ae01e9b | 2022-03-10 12:48:12 +0000 | [diff] [blame] | 170 | "android.hardware.bluetooth.audio@2.0", |
| 171 | "android.hardware.bluetooth.audio@2.1", |
Hansong Zhang | 8bb04bb | 2018-12-12 14:52:00 -0800 | [diff] [blame] | 172 | "libcrypto", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 173 | "liblog", |
| 174 | "libprotobuf-cpp-lite", |
| 175 | ], |
| 176 | static_libs: [ |
HsingYuan Lo | 2d3da48 | 2020-08-18 09:30:32 +0200 | [diff] [blame] | 177 | "crypto_toolbox_for_tests", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 178 | "libbtcore", |
| 179 | "libbt-bta", |
Cheney Ni | 895430b | 2018-12-12 20:20:28 +0800 | [diff] [blame] | 180 | "libbt-audio-hal-interface", |
Jakub Pawlowski | f9f4585 | 2017-07-03 15:39:36 -0700 | [diff] [blame] | 181 | "libbluetooth-types", |
Jack He | 9a30a9f | 2018-03-03 00:03:25 -0800 | [diff] [blame] | 182 | "libbt-protos-lite", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 183 | "libosi", |
Jack He | 4282398 | 2018-08-15 12:38:37 -0700 | [diff] [blame] | 184 | "libbt-common", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 185 | ], |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 186 | data: [ |
| 187 | ":audio_set_scenarios_bfbs", |
| 188 | ":audio_set_scenarios_json", |
| 189 | ":audio_set_configurations_bfbs", |
| 190 | ":audio_set_configurations_json", |
| 191 | ], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 192 | } |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 193 | |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 194 | cc_test { |
| 195 | name: "bt_host_test_bta", |
| 196 | defaults: ["fluoride_bta_defaults"], |
| 197 | test_suites: ["device-tests"], |
| 198 | host_supported: true, |
| 199 | include_dirs: [ |
| 200 | "packages/modules/Bluetooth/system", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 201 | "packages/modules/Bluetooth/system/gd", |
| 202 | ], |
| 203 | generated_headers: [ |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 204 | "BluetoothGeneratedDumpsysDataSchema_h", |
| 205 | "BluetoothGeneratedPackets_h", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 206 | ], |
| 207 | srcs: [ |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 208 | ":OsiCompatSources", |
Chris Manton | 847dc38 | 2021-05-12 10:08:48 -0700 | [diff] [blame] | 209 | ":TestCommonMainHandler", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 210 | ":TestMockBtif", |
| 211 | ":TestMockDevice", |
| 212 | ":TestMockMainShim", |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 213 | ":TestMockOsi", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 214 | ":TestMockStack", |
Chris Manton | 866c5da | 2021-07-15 22:21:18 -0700 | [diff] [blame] | 215 | "ar/bta_ar.cc", |
| 216 | "dm/bta_dm_api.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 217 | "dm/bta_dm_act.cc", |
| 218 | "dm/bta_dm_cfg.cc", |
| 219 | "dm/bta_dm_ci.cc", |
| 220 | "dm/bta_dm_main.cc", |
| 221 | "dm/bta_dm_pm.cc", |
| 222 | "gatt/bta_gattc_act.cc", |
| 223 | "gatt/bta_gattc_api.cc", |
| 224 | "gatt/bta_gattc_cache.cc", |
Jakub Pawlowski | 1ed87e9 | 2022-04-08 15:54:13 +0200 | [diff] [blame] | 225 | "gatt/bta_gattc_db_storage.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 226 | "gatt/bta_gattc_main.cc", |
| 227 | "gatt/bta_gattc_queue.cc", |
| 228 | "gatt/bta_gattc_utils.cc", |
| 229 | "gatt/database.cc", |
| 230 | "gatt/database_builder.cc", |
| 231 | "hh/bta_hh_act.cc", |
Chris Manton | 847dc38 | 2021-05-12 10:08:48 -0700 | [diff] [blame] | 232 | "hh/bta_hh_api.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 233 | "hh/bta_hh_cfg.cc", |
| 234 | "hh/bta_hh_le.cc", |
| 235 | "hh/bta_hh_main.cc", |
| 236 | "hh/bta_hh_utils.cc", |
Chris Manton | 3dc9ad8 | 2021-10-10 17:23:19 -0700 | [diff] [blame] | 237 | "pan/bta_pan_act.cc", |
| 238 | "pan/bta_pan_api.cc", |
| 239 | "pan/bta_pan_main.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 240 | "sys/bta_sys_conn.cc", |
| 241 | "sys/bta_sys_main.cc", |
| 242 | "test/bta_dm_test.cc", |
Chris Manton | 607b8c0 | 2021-05-07 09:45:55 -0700 | [diff] [blame] | 243 | "test/bta_gatt_test.cc", |
Chris Manton | 3dc9ad8 | 2021-10-10 17:23:19 -0700 | [diff] [blame] | 244 | "test/bta_pan_test.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 245 | ], |
| 246 | shared_libs: [ |
Yi Kong | 2fb33f8 | 2021-12-16 02:46:09 +0800 | [diff] [blame] | 247 | "libbase", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 248 | "libcrypto", |
| 249 | "liblog", |
| 250 | "libprotobuf-cpp-lite", |
| 251 | ], |
| 252 | static_libs: [ |
| 253 | "libbluetooth-types", |
| 254 | "libbt-common", |
| 255 | "libbt-protos-lite", |
| 256 | "libbtcore", |
William Escande | ae01e9b | 2022-03-10 12:48:12 +0000 | [diff] [blame] | 257 | "libflatbuffers-cpp", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 258 | "libgmock", |
| 259 | ], |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 260 | sanitize: { |
| 261 | address: true, |
| 262 | cfi: true, |
| 263 | misc_undefined: ["bounds"], |
| 264 | }, |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 265 | } |
| 266 | |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 267 | // bta hf client add record tests for target |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 268 | cc_test { |
| 269 | name: "net_test_hf_client_add_record", |
| 270 | defaults: ["fluoride_defaults"], |
| 271 | test_suites: ["device-tests"], |
| 272 | include_dirs: [ |
| 273 | "packages/modules/Bluetooth/system", |
Chris Manton | 131f21c | 2021-06-08 17:38:06 -0700 | [diff] [blame] | 274 | "packages/modules/Bluetooth/system/gd", |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 275 | "packages/modules/Bluetooth/system/bta/include", |
| 276 | "packages/modules/Bluetooth/system/bta/sys", |
| 277 | "packages/modules/Bluetooth/system/btif/include", |
| 278 | "packages/modules/Bluetooth/system/internal_include", |
| 279 | "packages/modules/Bluetooth/system/stack/include", |
| 280 | "packages/modules/Bluetooth/system/utils/include", |
| 281 | ], |
| 282 | srcs: [ |
| 283 | "test/bta_hf_client_add_record_test.cc", |
| 284 | ], |
| 285 | header_libs: ["libbluetooth_headers"], |
| 286 | shared_libs: [ |
| 287 | "libcutils", |
| 288 | "liblog", |
| 289 | ], |
| 290 | static_libs: [ |
| 291 | "libbluetooth-types", |
| 292 | "libosi", |
| 293 | ], |
| 294 | cflags: ["-DBUILDCFG"], |
| 295 | } |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 296 | |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 297 | // csis unit tests for host |
| 298 | cc_test { |
| 299 | name: "bluetooth_csis_test", |
| 300 | test_suites: ["device-tests"], |
| 301 | defaults: [ |
| 302 | "fluoride_bta_defaults", |
| 303 | "clang_coverage_bin", |
| 304 | ], |
| 305 | host_supported: true, |
| 306 | include_dirs: [ |
| 307 | "packages/modules/Bluetooth/system", |
| 308 | "packages/modules/Bluetooth/system/bta/groups", |
| 309 | "packages/modules/Bluetooth/system/bta/include", |
| 310 | "packages/modules/Bluetooth/system/bta/test/common", |
| 311 | "packages/modules/Bluetooth/system/btif/include", |
| 312 | "packages/modules/Bluetooth/system/osi/include", |
| 313 | ], |
| 314 | srcs : [ |
| 315 | ":TestMockBtif", |
Chienyuan | 9c8568e | 2021-11-15 20:01:15 +0800 | [diff] [blame] | 316 | ":TestMockMainShimLeScanning", |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 317 | "csis/csis_client.cc", |
| 318 | "csis/csis_client_test.cc", |
| 319 | "groups/groups.cc", |
| 320 | "gatt/database.cc", |
| 321 | "gatt/database_builder.cc", |
| 322 | "test/common/bta_dm_api_mock.cc", |
| 323 | "test/common/bta_gatt_api_mock.cc", |
| 324 | "test/common/bta_gatt_queue_mock.cc", |
| 325 | "test/common/btm_api_mock.cc", |
| 326 | ], |
| 327 | shared_libs: [ |
| 328 | "libprotobuf-cpp-lite", |
| 329 | "libcrypto", |
| 330 | ], |
| 331 | static_libs : [ |
| 332 | "crypto_toolbox_for_tests", |
| 333 | "libgmock", |
| 334 | "libbt-common", |
| 335 | "libbt-protos-lite", |
| 336 | "libosi", |
| 337 | ], |
| 338 | sanitize: { |
| 339 | cfi: true, |
| 340 | scs: true, |
| 341 | address: true, |
| 342 | all_undefined: true, |
| 343 | integer_overflow: true, |
| 344 | diag: { |
| 345 | undefined : true |
| 346 | }, |
| 347 | }, |
| 348 | } |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 349 | |
Łukasz Rymanowski | a6b8333 | 2020-12-13 07:12:57 +0000 | [diff] [blame] | 350 | // groups unit tests for host |
| 351 | cc_test { |
| 352 | name: "bluetooth_groups_test", |
| 353 | test_suites: ["device-tests"], |
| 354 | defaults: [ |
| 355 | "fluoride_bta_defaults", |
| 356 | "clang_coverage_bin", |
| 357 | ], |
| 358 | host_supported: true, |
| 359 | include_dirs: [ |
| 360 | "packages/modules/Bluetooth/system", |
| 361 | "packages/modules/Bluetooth/system/bta/include", |
| 362 | ], |
| 363 | srcs : [ |
| 364 | ":TestMockBtif", |
| 365 | "groups/groups_test.cc", |
| 366 | "groups/groups.cc", |
| 367 | ], |
| 368 | shared_libs: [ |
| 369 | "libprotobuf-cpp-lite", |
| 370 | "libcrypto", |
| 371 | ], |
| 372 | static_libs : [ |
| 373 | "crypto_toolbox_for_tests", |
| 374 | "libgmock", |
| 375 | "libbt-common", |
| 376 | "libbt-protos-lite", |
| 377 | "libosi", |
| 378 | ], |
| 379 | sanitize: { |
| 380 | cfi: true, |
| 381 | scs: true, |
| 382 | address: true, |
| 383 | all_undefined: true, |
| 384 | integer_overflow: true, |
| 385 | diag: { |
| 386 | undefined : true |
| 387 | }, |
| 388 | }, |
| 389 | } |
| 390 | |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 391 | // bta unit tests for host |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 392 | cc_test { |
| 393 | name: "bluetooth_vc_test", |
| 394 | test_suites: ["device-tests"], |
| 395 | defaults: [ |
| 396 | "fluoride_bta_defaults", |
| 397 | "clang_coverage_bin", |
| 398 | ], |
| 399 | host_supported: true, |
| 400 | include_dirs: [ |
| 401 | "packages/modules/Bluetooth/system", |
| 402 | "packages/modules/Bluetooth/system/bta/include", |
| 403 | "packages/modules/Bluetooth/system/bta/test/common", |
Łukasz Rymanowski | 9f3756e | 2022-05-06 11:59:36 +0000 | [diff] [blame] | 404 | "packages/modules/Bluetooth/system/gd", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 405 | "packages/modules/Bluetooth/system/stack/include", |
| 406 | ], |
| 407 | srcs : [ |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 408 | ":TestMockOsi", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 409 | "gatt/database.cc", |
| 410 | "gatt/database_builder.cc", |
| 411 | "test/common/bta_gatt_api_mock.cc", |
| 412 | "test/common/bta_gatt_queue_mock.cc", |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 413 | "test/common/mock_csis_client.cc", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 414 | "test/common/btm_api_mock.cc", |
| 415 | "vc/devices_test.cc", |
| 416 | "vc/device.cc", |
| 417 | "vc/vc.cc", |
| 418 | "vc/vc_test.cc", |
| 419 | ], |
| 420 | shared_libs: [ |
| 421 | "libprotobuf-cpp-lite", |
| 422 | "libcrypto", |
| 423 | ], |
| 424 | static_libs : [ |
| 425 | "crypto_toolbox_for_tests", |
| 426 | "libgmock", |
| 427 | "libbt-common", |
| 428 | "libbt-protos-lite", |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 429 | "libosi" |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 430 | ], |
| 431 | sanitize: { |
| 432 | cfi: false, |
| 433 | }, |
| 434 | } |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 435 | |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 436 | genrule { |
| 437 | name: "LeAudioSetConfigSchemas_h", |
| 438 | tools: [ |
| 439 | "flatc", |
| 440 | ], |
| 441 | cmd: "$(location flatc) -I packages/modules/Bluetooth/system/ -o $(genDir) --cpp $(in) ", |
| 442 | srcs: [ |
| 443 | "le_audio/audio_set_configurations.fbs", |
| 444 | "le_audio/audio_set_scenarios.fbs", |
| 445 | ], |
| 446 | out: [ |
| 447 | "audio_set_configurations_generated.h", |
| 448 | "audio_set_scenarios_generated.h", |
| 449 | ], |
| 450 | } |
| 451 | |
| 452 | genrule { |
| 453 | name: "LeAudioSetScenariosSchema_bfbs", |
| 454 | tools: [ |
| 455 | "flatc", |
| 456 | ], |
| 457 | cmd: "$(location flatc) -I packages/modules/Bluetooth/system/ -b --schema -o $(genDir) $(in) ", |
| 458 | srcs: [ |
| 459 | "le_audio/audio_set_scenarios.fbs", |
| 460 | ], |
| 461 | out: [ |
| 462 | "audio_set_scenarios.bfbs", |
| 463 | ], |
| 464 | } |
| 465 | |
| 466 | genrule { |
| 467 | name: "LeAudioSetConfigsSchema_bfbs", |
| 468 | tools: [ |
| 469 | "flatc", |
| 470 | ], |
| 471 | cmd: "$(location flatc) -I packages/modules/Bluetooth/system/ -b --schema -o $(genDir) $(in) ", |
| 472 | srcs: [ |
| 473 | "le_audio/audio_set_configurations.fbs", |
| 474 | ], |
| 475 | out: [ |
| 476 | "audio_set_configurations.bfbs", |
| 477 | ], |
| 478 | } |
| 479 | |
| 480 | prebuilt_etc { |
| 481 | name: "audio_set_scenarios_bfbs", |
| 482 | src: ":LeAudioSetScenariosSchema_bfbs", |
| 483 | filename: "audio_set_scenarios.bfbs", |
| 484 | sub_dir: "bluetooth/le_audio", |
| 485 | } |
| 486 | |
| 487 | prebuilt_etc { |
| 488 | name: "audio_set_scenarios_json", |
| 489 | src: "le_audio/audio_set_scenarios.json", |
| 490 | filename_from_src: true, |
| 491 | sub_dir: "bluetooth/le_audio", |
| 492 | } |
| 493 | |
| 494 | prebuilt_etc { |
| 495 | name: "audio_set_configurations_bfbs", |
| 496 | src: ":LeAudioSetConfigsSchema_bfbs", |
| 497 | filename: "audio_set_configurations.bfbs", |
| 498 | sub_dir: "bluetooth/le_audio", |
| 499 | } |
| 500 | |
| 501 | prebuilt_etc { |
| 502 | name: "audio_set_configurations_json", |
| 503 | src: "le_audio/audio_set_configurations.json", |
| 504 | filename_from_src: true, |
| 505 | sub_dir: "bluetooth/le_audio", |
| 506 | } |
| 507 | |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 508 | // bta unit tests for LE Audio |
| 509 | // ======================================================== |
| 510 | cc_test { |
| 511 | name: "bluetooth_le_audio_test", |
| 512 | test_suites: ["device-tests"], |
| 513 | defaults: [ |
| 514 | "fluoride_defaults", |
| 515 | "clang_coverage_bin", |
| 516 | ], |
| 517 | host_supported: true, |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 518 | target: { |
| 519 | darwin: { |
| 520 | enabled: false, |
| 521 | }, |
| 522 | android: { |
| 523 | cflags: [ |
| 524 | "-DOS_ANDROID", |
| 525 | ], |
| 526 | sanitize: { |
| 527 | misc_undefined: ["bounds"], |
| 528 | }, |
| 529 | }, |
| 530 | }, |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 531 | include_dirs: [ |
| 532 | "packages/modules/Bluetooth/system", |
| 533 | "packages/modules/Bluetooth/system/bta/include", |
| 534 | "packages/modules/Bluetooth/system/bta/test/common", |
| 535 | "packages/modules/Bluetooth/system/btif/include", |
| 536 | "packages/modules/Bluetooth/system/gd", |
| 537 | "packages/modules/Bluetooth/system/stack/include", |
| 538 | ], |
| 539 | srcs : [ |
| 540 | ":TestStubOsi", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 541 | ":TestMockBtaLeAudioHalVerifier", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 542 | "test/common/bta_gatt_api_mock.cc", |
| 543 | "test/common/bta_gatt_queue_mock.cc", |
| 544 | "test/common/btm_api_mock.cc", |
| 545 | "le_audio/client_audio.cc", |
| 546 | "le_audio/client_audio_test.cc", |
| 547 | "le_audio/client_parser.cc", |
| 548 | "le_audio/client_parser_test.cc", |
| 549 | "le_audio/devices.cc", |
| 550 | "le_audio/devices_test.cc", |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 551 | "le_audio/le_audio_set_configuration_provider_json.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 552 | "le_audio/le_audio_types.cc", |
| 553 | "le_audio/le_audio_types_test.cc", |
Josh Wu | c033a16 | 2022-05-05 01:29:04 -0700 | [diff] [blame^] | 554 | "le_audio/metrics_collector_linux.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 555 | "le_audio/mock_iso_manager.cc", |
| 556 | "test/common/mock_controller.cc", |
| 557 | "le_audio/state_machine.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 558 | "le_audio/state_machine_test.cc", |
| 559 | "le_audio/mock_codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 560 | ], |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 561 | data: [ |
| 562 | ":audio_set_scenarios_bfbs", |
| 563 | ":audio_set_scenarios_json", |
| 564 | ":audio_set_configurations_bfbs", |
| 565 | ":audio_set_configurations_json" |
| 566 | ], |
| 567 | generated_headers: [ |
| 568 | "LeAudioSetConfigSchemas_h", |
| 569 | ], |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 570 | shared_libs: [ |
| 571 | "libprotobuf-cpp-lite", |
| 572 | "libcrypto", |
| 573 | "liblog", // __android_log_print |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 574 | "android.hardware.bluetooth.audio@2.0", |
| 575 | "android.hardware.bluetooth.audio@2.1", |
| 576 | "libhidlbase", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 577 | ], |
| 578 | static_libs : [ |
| 579 | "libgmock", |
| 580 | "libbt-common", |
| 581 | "libbt-protos-lite", |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 582 | "libflatbuffers-cpp", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 583 | "libosi", |
| 584 | ], |
| 585 | sanitize: { |
| 586 | cfi: false, |
| 587 | }, |
| 588 | } |
| 589 | |
| 590 | cc_test { |
| 591 | name: "bluetooth_le_audio_client_test", |
| 592 | test_suites: ["device-tests"], |
| 593 | defaults: [ |
| 594 | "fluoride_bta_defaults", |
| 595 | "clang_coverage_bin", |
| 596 | ], |
| 597 | host_supported: true, |
| 598 | include_dirs: [ |
| 599 | "packages/modules/Bluetooth/system", |
| 600 | "packages/modules/Bluetooth/system/bta/include", |
| 601 | "packages/modules/Bluetooth/system/bta/test/common", |
| 602 | "packages/modules/Bluetooth/system/stack/include", |
| 603 | ], |
| 604 | srcs : [ |
Łukasz Rymanowski | af2d951 | 2022-01-20 22:23:14 +0000 | [diff] [blame] | 605 | ":TestStubOsi", |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 606 | ":TestMockBtaLeAudioHalVerifier", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 607 | "gatt/database.cc", |
| 608 | "gatt/database_builder.cc", |
| 609 | "le_audio/client.cc", |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 610 | "le_audio/client_audio.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 611 | "le_audio/client_parser.cc", |
| 612 | "le_audio/devices.cc", |
| 613 | "le_audio/le_audio_client_test.cc", |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 614 | "le_audio/le_audio_set_configuration_provider_json.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 615 | "le_audio/le_audio_types.cc", |
Josh Wu | c033a16 | 2022-05-05 01:29:04 -0700 | [diff] [blame^] | 616 | "le_audio/metrics_collector.cc", |
| 617 | "le_audio/metrics_collector_test.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 618 | "le_audio/mock_iso_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 619 | "le_audio/mock_state_machine.cc", |
| 620 | "test/common/btm_api_mock.cc", |
| 621 | "test/common/bta_gatt_api_mock.cc", |
| 622 | "test/common/bta_gatt_queue_mock.cc", |
| 623 | "test/common/btif_storage_mock.cc", |
| 624 | "test/common/mock_csis_client.cc", |
| 625 | "test/common/mock_controller.cc", |
| 626 | "test/common/mock_device_groups.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 627 | "le_audio/mock_codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 628 | ], |
| 629 | shared_libs: [ |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 630 | "android.hardware.bluetooth.audio@2.0", |
| 631 | "android.hardware.bluetooth.audio@2.1", |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 632 | "libhidlbase", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 633 | "libprotobuf-cpp-lite", |
| 634 | "libcrypto", |
| 635 | "liblog", |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 636 | "libfmq", |
| 637 | "libbinder_ndk", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 638 | ], |
| 639 | static_libs : [ |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 640 | "libbt-audio-hal-interface", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 641 | "crypto_toolbox_for_tests", |
| 642 | "libgmock", |
| 643 | "libbt-common", |
| 644 | "libbt-protos-lite", |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 645 | "libflatbuffers-cpp", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 646 | "libosi", |
Jakub Pawlowski | d0a41af | 2022-01-03 17:53:02 +0100 | [diff] [blame] | 647 | "liblc3", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 648 | ], |
Jakub Tyszkowski | fa3e4cb | 2022-01-25 15:52:01 +0000 | [diff] [blame] | 649 | data: [ |
| 650 | ":audio_set_scenarios_bfbs", |
| 651 | ":audio_set_scenarios_json", |
| 652 | ":audio_set_configurations_bfbs", |
| 653 | ":audio_set_configurations_json", |
| 654 | ], |
| 655 | generated_headers: [ |
| 656 | "LeAudioSetConfigSchemas_h", |
| 657 | ], |
Josh Wu | 28d6da1 | 2021-12-22 06:13:40 -0800 | [diff] [blame] | 658 | target: { |
| 659 | android: { |
| 660 | shared_libs: [ |
| 661 | "libbinder_ndk", |
Omer Osman | 066fa55 | 2022-05-01 03:22:13 +0000 | [diff] [blame] | 662 | "android.hardware.bluetooth.audio-V2-ndk", |
Josh Wu | 28d6da1 | 2021-12-22 06:13:40 -0800 | [diff] [blame] | 663 | ], |
| 664 | }, |
| 665 | }, |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 666 | sanitize: { |
| 667 | cfi: true, |
| 668 | scs: true, |
| 669 | address: true, |
| 670 | all_undefined: true, |
| 671 | integer_overflow: true, |
| 672 | diag: { |
| 673 | undefined : true |
| 674 | }, |
| 675 | }, |
| 676 | } |
| 677 | |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 678 | cc_test { |
| 679 | name: "bluetooth_test_broadcaster_sm", |
| 680 | test_suites: ["device-tests"], |
| 681 | defaults: [ |
| 682 | "fluoride_bta_defaults", |
| 683 | "clang_coverage_bin", |
| 684 | ], |
| 685 | host_supported: true, |
| 686 | include_dirs: [ |
| 687 | "packages/modules/Bluetooth/system", |
| 688 | "packages/modules/Bluetooth/system/bta/include", |
| 689 | "packages/modules/Bluetooth/system/bta/le_audio", |
| 690 | "packages/modules/Bluetooth/system/btif/include", |
| 691 | "packages/modules/Bluetooth/system/stack/include", |
| 692 | "packages/modules/Bluetooth/system/stack/btm", |
| 693 | ], |
| 694 | srcs : [ |
| 695 | "le_audio/broadcaster/broadcaster_types.cc", |
| 696 | "le_audio/broadcaster/mock_ble_advertising_manager.cc", |
| 697 | "le_audio/broadcaster/state_machine.cc", |
| 698 | "le_audio/broadcaster/state_machine_test.cc", |
| 699 | "le_audio/le_audio_types.cc", |
| 700 | "le_audio/mock_iso_manager.cc", |
Patty | 0d8b97e | 2022-01-07 17:32:29 +0800 | [diff] [blame] | 701 | "le_audio/mock_codec_manager.cc", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 702 | ], |
| 703 | shared_libs: [ |
| 704 | "libprotobuf-cpp-lite", |
| 705 | "libcrypto", |
| 706 | ], |
| 707 | static_libs : [ |
| 708 | "libgmock", |
| 709 | "libbt-common", |
| 710 | "libbt-protos-lite", |
| 711 | "liblc3", |
| 712 | ], |
| 713 | sanitize: { |
| 714 | cfi: true, |
| 715 | scs: true, |
| 716 | address: true, |
| 717 | all_undefined: true, |
| 718 | integer_overflow: true, |
| 719 | diag: { |
| 720 | undefined : true |
| 721 | }, |
| 722 | }, |
| 723 | } |
| 724 | |
| 725 | cc_test { |
| 726 | name: "bluetooth_test_broadcaster", |
| 727 | test_suites: ["device-tests"], |
| 728 | defaults: [ |
| 729 | "fluoride_bta_defaults", |
| 730 | "clang_coverage_bin", |
| 731 | ], |
| 732 | host_supported: true, |
| 733 | include_dirs: [ |
| 734 | "packages/modules/Bluetooth/system", |
| 735 | "packages/modules/Bluetooth/system/bta/include", |
| 736 | "packages/modules/Bluetooth/system/bta/le_audio", |
| 737 | "packages/modules/Bluetooth/system/bta/test/common", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 738 | "packages/modules/Bluetooth/system/btif/include", |
| 739 | "packages/modules/Bluetooth/system/stack/include", |
| 740 | "packages/modules/Bluetooth/system/stack/btm", |
| 741 | ], |
| 742 | srcs : [ |
| 743 | ":TestStubOsi", |
| 744 | "le_audio/broadcaster/broadcaster.cc", |
| 745 | "le_audio/broadcaster/broadcaster_test.cc", |
| 746 | "le_audio/broadcaster/broadcaster_types.cc", |
| 747 | "le_audio/broadcaster/mock_ble_advertising_manager.cc", |
| 748 | "le_audio/broadcaster/mock_state_machine.cc", |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 749 | "le_audio/client_audio.cc", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 750 | "le_audio/le_audio_types.cc", |
| 751 | "le_audio/mock_iso_manager.cc", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 752 | "test/common/mock_controller.cc", |
Patty | 0d8b97e | 2022-01-07 17:32:29 +0800 | [diff] [blame] | 753 | "le_audio/mock_codec_manager.cc", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 754 | ], |
| 755 | shared_libs: [ |
| 756 | "libprotobuf-cpp-lite", |
| 757 | "libcrypto", |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 758 | "libfmq", |
| 759 | "libbinder_ndk", |
| 760 | "android.hardware.bluetooth.audio@2.0", |
| 761 | "android.hardware.bluetooth.audio@2.1", |
| 762 | "libhidlbase", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 763 | ], |
| 764 | static_libs : [ |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 765 | "libbt-audio-hal-interface", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 766 | "libgmock", |
| 767 | "libbt-common", |
| 768 | "libbt-protos-lite", |
| 769 | "libosi", |
| 770 | "liblc3", |
| 771 | ], |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 772 | target: { |
| 773 | android: { |
| 774 | shared_libs: [ |
| 775 | "libbinder_ndk", |
Omer Osman | 066fa55 | 2022-05-01 03:22:13 +0000 | [diff] [blame] | 776 | "android.hardware.bluetooth.audio-V2-ndk", |
Grzegorz Kołodziejczyk | 4b8839d | 2022-03-08 14:53:55 +0000 | [diff] [blame] | 777 | ], |
| 778 | }, |
| 779 | }, |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame] | 780 | sanitize: { |
| 781 | cfi: true, |
| 782 | scs: true, |
| 783 | address: true, |
| 784 | all_undefined: true, |
| 785 | integer_overflow: true, |
| 786 | diag: { |
| 787 | undefined : true |
| 788 | }, |
| 789 | }, |
| 790 | } |
Jakub Tyszkowski | b87fc99 | 2021-04-08 15:08:35 +0000 | [diff] [blame] | 791 | |
| 792 | cc_test { |
| 793 | name: "bluetooth_has_test", |
| 794 | test_suites: ["device-tests"], |
| 795 | defaults: [ |
| 796 | "fluoride_bta_defaults", |
| 797 | "clang_coverage_bin", |
| 798 | ], |
| 799 | host_supported: true, |
| 800 | include_dirs: [ |
| 801 | "packages/modules/Bluetooth/system", |
| 802 | "packages/modules/Bluetooth/system/bta/include", |
| 803 | "packages/modules/Bluetooth/system/bta/test/common", |
| 804 | "packages/modules/Bluetooth/system/stack/include", |
| 805 | ], |
| 806 | srcs : [ |
| 807 | "gatt/database.cc", |
| 808 | "gatt/database_builder.cc", |
| 809 | "has/has_client.cc", |
| 810 | "has/has_client_test.cc", |
| 811 | "has/has_ctp.cc", |
| 812 | "has/has_journal.cc", |
| 813 | "has/has_preset.cc", |
| 814 | "has/has_types.cc", |
| 815 | "test/common/bta_gatt_api_mock.cc", |
| 816 | "test/common/bta_gatt_queue_mock.cc", |
| 817 | "test/common/btif_storage_mock.cc", |
| 818 | "test/common/btm_api_mock.cc", |
| 819 | "test/common/mock_controller.cc", |
| 820 | "test/common/mock_csis_client.cc", |
| 821 | ], |
| 822 | shared_libs: [ |
| 823 | "libprotobuf-cpp-lite", |
| 824 | "libcrypto", |
| 825 | ], |
| 826 | static_libs : [ |
| 827 | "crypto_toolbox_for_tests", |
| 828 | "libgmock", |
| 829 | "libbt-common", |
| 830 | "libbt-protos-lite", |
| 831 | ], |
| 832 | sanitize: { |
| 833 | cfi: true, |
| 834 | scs: true, |
| 835 | address: true, |
| 836 | all_undefined: true, |
| 837 | integer_overflow: true, |
| 838 | diag: { |
| 839 | undefined : true |
| 840 | }, |
| 841 | }, |
ahujapalash | 5add3d5 | 2022-03-10 18:38:02 +0000 | [diff] [blame] | 842 | } |