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", |
| 12 | defaults: ["fluoride_defaults"], |
| 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", |
| 23 | "packages/modules/Bluetooth/system/btcore/include", |
Ajay Panicker | 0ad702c | 2018-03-16 17:13:50 -0700 | [diff] [blame] | 24 | "packages/modules/Bluetooth/system/btif/avrcp", |
Jack He | 483217b | 2017-10-21 01:35:57 -0700 | [diff] [blame] | 25 | "packages/modules/Bluetooth/system/btif/include", |
Chris Manton | 131f21c | 2021-06-08 17:38:06 -0700 | [diff] [blame] | 26 | "packages/modules/Bluetooth/system/gd", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 27 | "packages/modules/Bluetooth/system/hci/include", |
Jakub Pawlowski | 9e9eb4b | 2017-10-17 16:40:41 -0700 | [diff] [blame] | 28 | "packages/modules/Bluetooth/system/internal_include", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 29 | "packages/modules/Bluetooth/system/stack/include", |
| 30 | "packages/modules/Bluetooth/system/stack/btm", |
| 31 | "packages/modules/Bluetooth/system/udrv/include", |
| 32 | "packages/modules/Bluetooth/system/vnd/include", |
| 33 | "packages/modules/Bluetooth/system/utils/include", |
Zach Johnson | 22761ec | 2020-12-21 18:14:30 -0800 | [diff] [blame] | 34 | "packages/modules/Bluetooth/system/gd/rust/shim", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 35 | ], |
| 36 | shared_libs: [ |
| 37 | "libcutils", |
| 38 | ], |
Jakub Pawlowski | a75a654 | 2017-10-19 00:26:09 -0700 | [diff] [blame] | 39 | header_libs: ["libbluetooth_headers"], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 40 | cflags: ["-DBUILDCFG"], |
| 41 | } |
| 42 | |
Chris Manton | a9c16c8 | 2021-07-08 08:22:48 -0700 | [diff] [blame] | 43 | filegroup { |
| 44 | name: "BtaDmSources", |
| 45 | srcs: [ |
| 46 | "dm/bta_dm_act.cc", |
| 47 | "dm/bta_dm_api.cc", |
| 48 | "dm/bta_dm_cfg.cc", |
| 49 | "dm/bta_dm_ci.cc", |
| 50 | "dm/bta_dm_main.cc", |
| 51 | "dm/bta_dm_pm.cc", |
| 52 | ], |
| 53 | } |
| 54 | |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 55 | // BTA static library for target |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 56 | cc_library_static { |
| 57 | name: "libbt-bta", |
| 58 | defaults: ["fluoride_bta_defaults"], |
| 59 | srcs: [ |
Chris Manton | a9c16c8 | 2021-07-08 08:22:48 -0700 | [diff] [blame] | 60 | ":BtaDmSources", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 61 | "ag/bta_ag_act.cc", |
| 62 | "ag/bta_ag_api.cc", |
| 63 | "ag/bta_ag_at.cc", |
| 64 | "ag/bta_ag_cfg.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 65 | "ag/bta_ag_cmd.cc", |
| 66 | "ag/bta_ag_main.cc", |
| 67 | "ag/bta_ag_rfc.cc", |
| 68 | "ag/bta_ag_sco.cc", |
| 69 | "ag/bta_ag_sdp.cc", |
| 70 | "ar/bta_ar.cc", |
| 71 | "av/bta_av_aact.cc", |
| 72 | "av/bta_av_act.cc", |
| 73 | "av/bta_av_api.cc", |
| 74 | "av/bta_av_cfg.cc", |
| 75 | "av/bta_av_ci.cc", |
| 76 | "av/bta_av_main.cc", |
| 77 | "av/bta_av_ssm.cc", |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 78 | "csis/csis_client.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 79 | "gatt/bta_gattc_act.cc", |
| 80 | "gatt/bta_gattc_api.cc", |
| 81 | "gatt/bta_gattc_cache.cc", |
| 82 | "gatt/bta_gattc_main.cc", |
Jakub Pawlowski | 19d0aae | 2017-11-29 21:49:32 -0800 | [diff] [blame] | 83 | "gatt/bta_gattc_queue.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 84 | "gatt/bta_gattc_utils.cc", |
| 85 | "gatt/bta_gatts_act.cc", |
| 86 | "gatt/bta_gatts_api.cc", |
| 87 | "gatt/bta_gatts_main.cc", |
| 88 | "gatt/bta_gatts_utils.cc", |
Jakub Pawlowski | 6d3cb11 | 2018-04-18 07:31:30 -0700 | [diff] [blame] | 89 | "gatt/database.cc", |
| 90 | "gatt/database_builder.cc", |
Łukasz Rymanowski | a6b8333 | 2020-12-13 07:12:57 +0000 | [diff] [blame] | 91 | "groups/groups.cc", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 92 | "vc/device.cc", |
| 93 | "vc/vc.cc", |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame^] | 94 | "le_audio/broadcaster/broadcaster.cc", |
| 95 | "le_audio/broadcaster/broadcaster_types.cc", |
| 96 | "le_audio/broadcaster/state_machine.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 97 | "le_audio/client.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 98 | "le_audio/codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 99 | "le_audio/devices.cc", |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 100 | "le_audio/hal_verifier.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 101 | "le_audio/state_machine.cc", |
| 102 | "le_audio/client_parser.cc", |
| 103 | "le_audio/client_audio.cc", |
| 104 | "le_audio/le_audio_types.cc", |
Jakub Pawlowski | 7d06e57 | 2018-02-28 22:44:42 -0800 | [diff] [blame] | 105 | "hearing_aid/hearing_aid.cc", |
Hansong Zhang | d19e027 | 2018-01-19 12:23:57 -0800 | [diff] [blame] | 106 | "hearing_aid/hearing_aid_audio_source.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 107 | "hf_client/bta_hf_client_act.cc", |
| 108 | "hf_client/bta_hf_client_api.cc", |
| 109 | "hf_client/bta_hf_client_at.cc", |
| 110 | "hf_client/bta_hf_client_main.cc", |
| 111 | "hf_client/bta_hf_client_rfc.cc", |
| 112 | "hf_client/bta_hf_client_sco.cc", |
| 113 | "hf_client/bta_hf_client_sdp.cc", |
| 114 | "hh/bta_hh_act.cc", |
| 115 | "hh/bta_hh_api.cc", |
| 116 | "hh/bta_hh_cfg.cc", |
| 117 | "hh/bta_hh_le.cc", |
| 118 | "hh/bta_hh_main.cc", |
| 119 | "hh/bta_hh_utils.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 120 | "hd/bta_hd_act.cc", |
| 121 | "hd/bta_hd_api.cc", |
| 122 | "hd/bta_hd_main.cc", |
| 123 | "jv/bta_jv_act.cc", |
| 124 | "jv/bta_jv_api.cc", |
| 125 | "jv/bta_jv_cfg.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 126 | "pan/bta_pan_act.cc", |
| 127 | "pan/bta_pan_api.cc", |
| 128 | "pan/bta_pan_ci.cc", |
| 129 | "pan/bta_pan_main.cc", |
| 130 | "sdp/bta_sdp.cc", |
| 131 | "sdp/bta_sdp_act.cc", |
| 132 | "sdp/bta_sdp_api.cc", |
| 133 | "sdp/bta_sdp_cfg.cc", |
| 134 | "sys/bta_sys_conn.cc", |
| 135 | "sys/bta_sys_main.cc", |
| 136 | "sys/utl.cc", |
| 137 | ], |
Ajay Panicker | 0ad702c | 2018-03-16 17:13:50 -0700 | [diff] [blame] | 138 | static_libs: [ |
| 139 | "avrcp-target-service", |
| 140 | "lib-bt-packets", |
Chen Chen | b61f4b8 | 2022-01-10 13:31:44 -0800 | [diff] [blame] | 141 | "libbt-platform-protos-lite", |
Ajay Panicker | 0ad702c | 2018-03-16 17:13:50 -0700 | [diff] [blame] | 142 | ], |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 143 | shared_libs: [ |
| 144 | "android.hardware.bluetooth.audio@2.0", |
| 145 | "android.hardware.bluetooth.audio@2.1", |
Alice Kuo | c5275a3 | 2021-11-08 22:42:52 +0800 | [diff] [blame] | 146 | "android.hardware.bluetooth.audio@2.2", |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 147 | ], |
Hansong Zhang | 777b634 | 2021-02-23 15:52:11 -0800 | [diff] [blame] | 148 | host_supported: true, |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | // bta unit tests for target |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 152 | cc_test { |
| 153 | name: "net_test_bta", |
| 154 | defaults: ["fluoride_bta_defaults"], |
Yanfei Zhou | d243981 | 2018-08-28 10:58:52 +0800 | [diff] [blame] | 155 | test_suites: ["device-tests"], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 156 | srcs: [ |
Chris Manton | 8fe4751 | 2021-09-24 13:30:54 -0700 | [diff] [blame] | 157 | ":TestMockStackBtm", |
| 158 | ":TestCommonMockFunctions", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 159 | "test/bta_hf_client_test.cc", |
Yanfei Zhou | d243981 | 2018-08-28 10:58:52 +0800 | [diff] [blame] | 160 | "test/bta_dm_cust_uuid_test.cc", |
Fei Zheng | a6d4be1 | 2019-12-25 10:45:51 +0800 | [diff] [blame] | 161 | "test/bta_dip_test.cc", |
Jakub Pawlowski | 6d3cb11 | 2018-04-18 07:31:30 -0700 | [diff] [blame] | 162 | "test/gatt/database_builder_test.cc", |
| 163 | "test/gatt/database_builder_sample_device_test.cc", |
| 164 | "test/gatt/database_test.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 165 | ], |
| 166 | shared_libs: [ |
Hansong Zhang | 8bb04bb | 2018-12-12 14:52:00 -0800 | [diff] [blame] | 167 | "libcrypto", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 168 | "liblog", |
| 169 | "libprotobuf-cpp-lite", |
| 170 | ], |
| 171 | static_libs: [ |
HsingYuan Lo | 2d3da48 | 2020-08-18 09:30:32 +0200 | [diff] [blame] | 172 | "crypto_toolbox_for_tests", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 173 | "libbtcore", |
| 174 | "libbt-bta", |
Cheney Ni | 895430b | 2018-12-12 20:20:28 +0800 | [diff] [blame] | 175 | "libbt-audio-hal-interface", |
Jakub Pawlowski | f9f4585 | 2017-07-03 15:39:36 -0700 | [diff] [blame] | 176 | "libbluetooth-types", |
Jack He | 9a30a9f | 2018-03-03 00:03:25 -0800 | [diff] [blame] | 177 | "libbt-protos-lite", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 178 | "libosi", |
Jack He | 4282398 | 2018-08-15 12:38:37 -0700 | [diff] [blame] | 179 | "libbt-common", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 180 | ], |
| 181 | } |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 182 | |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 183 | cc_test { |
| 184 | name: "bt_host_test_bta", |
| 185 | defaults: ["fluoride_bta_defaults"], |
| 186 | test_suites: ["device-tests"], |
| 187 | host_supported: true, |
| 188 | include_dirs: [ |
| 189 | "packages/modules/Bluetooth/system", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 190 | "packages/modules/Bluetooth/system/gd", |
| 191 | ], |
| 192 | generated_headers: [ |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 193 | "BluetoothGeneratedDumpsysDataSchema_h", |
| 194 | "BluetoothGeneratedPackets_h", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 195 | ], |
| 196 | srcs: [ |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 197 | ":OsiCompatSources", |
Chris Manton | 847dc38 | 2021-05-12 10:08:48 -0700 | [diff] [blame] | 198 | ":TestCommonMainHandler", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 199 | ":TestMockBtif", |
| 200 | ":TestMockDevice", |
| 201 | ":TestMockMainShim", |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 202 | ":TestMockOsi", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 203 | ":TestMockStack", |
Chris Manton | 866c5da | 2021-07-15 22:21:18 -0700 | [diff] [blame] | 204 | "ar/bta_ar.cc", |
| 205 | "dm/bta_dm_api.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 206 | "dm/bta_dm_act.cc", |
| 207 | "dm/bta_dm_cfg.cc", |
| 208 | "dm/bta_dm_ci.cc", |
| 209 | "dm/bta_dm_main.cc", |
| 210 | "dm/bta_dm_pm.cc", |
| 211 | "gatt/bta_gattc_act.cc", |
| 212 | "gatt/bta_gattc_api.cc", |
| 213 | "gatt/bta_gattc_cache.cc", |
| 214 | "gatt/bta_gattc_main.cc", |
| 215 | "gatt/bta_gattc_queue.cc", |
| 216 | "gatt/bta_gattc_utils.cc", |
| 217 | "gatt/database.cc", |
| 218 | "gatt/database_builder.cc", |
| 219 | "hh/bta_hh_act.cc", |
Chris Manton | 847dc38 | 2021-05-12 10:08:48 -0700 | [diff] [blame] | 220 | "hh/bta_hh_api.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 221 | "hh/bta_hh_cfg.cc", |
| 222 | "hh/bta_hh_le.cc", |
| 223 | "hh/bta_hh_main.cc", |
| 224 | "hh/bta_hh_utils.cc", |
Chris Manton | 3dc9ad8 | 2021-10-10 17:23:19 -0700 | [diff] [blame] | 225 | "pan/bta_pan_act.cc", |
| 226 | "pan/bta_pan_api.cc", |
| 227 | "pan/bta_pan_main.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 228 | "sys/bta_sys_conn.cc", |
| 229 | "sys/bta_sys_main.cc", |
| 230 | "test/bta_dm_test.cc", |
Chris Manton | 607b8c0 | 2021-05-07 09:45:55 -0700 | [diff] [blame] | 231 | "test/bta_gatt_test.cc", |
Chris Manton | 3dc9ad8 | 2021-10-10 17:23:19 -0700 | [diff] [blame] | 232 | "test/bta_pan_test.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 233 | ], |
| 234 | shared_libs: [ |
Yi Kong | 2fb33f8 | 2021-12-16 02:46:09 +0800 | [diff] [blame] | 235 | "libbase", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 236 | "libcrypto", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 237 | "libflatbuffers-cpp", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 238 | "liblog", |
| 239 | "libprotobuf-cpp-lite", |
| 240 | ], |
| 241 | static_libs: [ |
| 242 | "libbluetooth-types", |
| 243 | "libbt-common", |
| 244 | "libbt-protos-lite", |
| 245 | "libbtcore", |
| 246 | "libgmock", |
| 247 | ], |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 248 | sanitize: { |
| 249 | address: true, |
| 250 | cfi: true, |
| 251 | misc_undefined: ["bounds"], |
| 252 | }, |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 253 | } |
| 254 | |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 255 | // bta hf client add record tests for target |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 256 | cc_test { |
| 257 | name: "net_test_hf_client_add_record", |
| 258 | defaults: ["fluoride_defaults"], |
| 259 | test_suites: ["device-tests"], |
| 260 | include_dirs: [ |
| 261 | "packages/modules/Bluetooth/system", |
Chris Manton | 131f21c | 2021-06-08 17:38:06 -0700 | [diff] [blame] | 262 | "packages/modules/Bluetooth/system/gd", |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 263 | "packages/modules/Bluetooth/system/bta/include", |
| 264 | "packages/modules/Bluetooth/system/bta/sys", |
| 265 | "packages/modules/Bluetooth/system/btif/include", |
| 266 | "packages/modules/Bluetooth/system/internal_include", |
| 267 | "packages/modules/Bluetooth/system/stack/include", |
| 268 | "packages/modules/Bluetooth/system/utils/include", |
| 269 | ], |
| 270 | srcs: [ |
| 271 | "test/bta_hf_client_add_record_test.cc", |
| 272 | ], |
| 273 | header_libs: ["libbluetooth_headers"], |
| 274 | shared_libs: [ |
| 275 | "libcutils", |
| 276 | "liblog", |
| 277 | ], |
| 278 | static_libs: [ |
| 279 | "libbluetooth-types", |
| 280 | "libosi", |
| 281 | ], |
| 282 | cflags: ["-DBUILDCFG"], |
| 283 | } |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 284 | |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 285 | // csis unit tests for host |
| 286 | cc_test { |
| 287 | name: "bluetooth_csis_test", |
| 288 | test_suites: ["device-tests"], |
| 289 | defaults: [ |
| 290 | "fluoride_bta_defaults", |
| 291 | "clang_coverage_bin", |
| 292 | ], |
| 293 | host_supported: true, |
| 294 | include_dirs: [ |
| 295 | "packages/modules/Bluetooth/system", |
| 296 | "packages/modules/Bluetooth/system/bta/groups", |
| 297 | "packages/modules/Bluetooth/system/bta/include", |
| 298 | "packages/modules/Bluetooth/system/bta/test/common", |
| 299 | "packages/modules/Bluetooth/system/btif/include", |
| 300 | "packages/modules/Bluetooth/system/osi/include", |
| 301 | ], |
| 302 | srcs : [ |
| 303 | ":TestMockBtif", |
Chienyuan | 9c8568e | 2021-11-15 20:01:15 +0800 | [diff] [blame] | 304 | ":TestMockMainShimLeScanning", |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 305 | "csis/csis_client.cc", |
| 306 | "csis/csis_client_test.cc", |
| 307 | "groups/groups.cc", |
| 308 | "gatt/database.cc", |
| 309 | "gatt/database_builder.cc", |
| 310 | "test/common/bta_dm_api_mock.cc", |
| 311 | "test/common/bta_gatt_api_mock.cc", |
| 312 | "test/common/bta_gatt_queue_mock.cc", |
| 313 | "test/common/btm_api_mock.cc", |
| 314 | ], |
| 315 | shared_libs: [ |
| 316 | "libprotobuf-cpp-lite", |
| 317 | "libcrypto", |
| 318 | ], |
| 319 | static_libs : [ |
| 320 | "crypto_toolbox_for_tests", |
| 321 | "libgmock", |
| 322 | "libbt-common", |
| 323 | "libbt-protos-lite", |
| 324 | "libosi", |
| 325 | ], |
| 326 | sanitize: { |
| 327 | cfi: true, |
| 328 | scs: true, |
| 329 | address: true, |
| 330 | all_undefined: true, |
| 331 | integer_overflow: true, |
| 332 | diag: { |
| 333 | undefined : true |
| 334 | }, |
| 335 | }, |
| 336 | } |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 337 | |
Łukasz Rymanowski | a6b8333 | 2020-12-13 07:12:57 +0000 | [diff] [blame] | 338 | // groups unit tests for host |
| 339 | cc_test { |
| 340 | name: "bluetooth_groups_test", |
| 341 | test_suites: ["device-tests"], |
| 342 | defaults: [ |
| 343 | "fluoride_bta_defaults", |
| 344 | "clang_coverage_bin", |
| 345 | ], |
| 346 | host_supported: true, |
| 347 | include_dirs: [ |
| 348 | "packages/modules/Bluetooth/system", |
| 349 | "packages/modules/Bluetooth/system/bta/include", |
| 350 | ], |
| 351 | srcs : [ |
| 352 | ":TestMockBtif", |
| 353 | "groups/groups_test.cc", |
| 354 | "groups/groups.cc", |
| 355 | ], |
| 356 | shared_libs: [ |
| 357 | "libprotobuf-cpp-lite", |
| 358 | "libcrypto", |
| 359 | ], |
| 360 | static_libs : [ |
| 361 | "crypto_toolbox_for_tests", |
| 362 | "libgmock", |
| 363 | "libbt-common", |
| 364 | "libbt-protos-lite", |
| 365 | "libosi", |
| 366 | ], |
| 367 | sanitize: { |
| 368 | cfi: true, |
| 369 | scs: true, |
| 370 | address: true, |
| 371 | all_undefined: true, |
| 372 | integer_overflow: true, |
| 373 | diag: { |
| 374 | undefined : true |
| 375 | }, |
| 376 | }, |
| 377 | } |
| 378 | |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 379 | // bta unit tests for host |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 380 | cc_test { |
| 381 | name: "bluetooth_vc_test", |
| 382 | test_suites: ["device-tests"], |
| 383 | defaults: [ |
| 384 | "fluoride_bta_defaults", |
| 385 | "clang_coverage_bin", |
| 386 | ], |
| 387 | host_supported: true, |
| 388 | include_dirs: [ |
| 389 | "packages/modules/Bluetooth/system", |
| 390 | "packages/modules/Bluetooth/system/bta/include", |
| 391 | "packages/modules/Bluetooth/system/bta/test/common", |
| 392 | "packages/modules/Bluetooth/system/stack/include", |
| 393 | ], |
| 394 | srcs : [ |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 395 | ":TestMockOsi", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 396 | "gatt/database.cc", |
| 397 | "gatt/database_builder.cc", |
| 398 | "test/common/bta_gatt_api_mock.cc", |
| 399 | "test/common/bta_gatt_queue_mock.cc", |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 400 | "test/common/mock_csis_client.cc", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 401 | "test/common/btm_api_mock.cc", |
| 402 | "vc/devices_test.cc", |
| 403 | "vc/device.cc", |
| 404 | "vc/vc.cc", |
| 405 | "vc/vc_test.cc", |
| 406 | ], |
| 407 | shared_libs: [ |
| 408 | "libprotobuf-cpp-lite", |
| 409 | "libcrypto", |
| 410 | ], |
| 411 | static_libs : [ |
| 412 | "crypto_toolbox_for_tests", |
| 413 | "libgmock", |
| 414 | "libbt-common", |
| 415 | "libbt-protos-lite", |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 416 | "libosi" |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 417 | ], |
| 418 | sanitize: { |
| 419 | cfi: false, |
| 420 | }, |
| 421 | } |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 422 | |
| 423 | // bta unit tests for LE Audio |
| 424 | // ======================================================== |
| 425 | cc_test { |
| 426 | name: "bluetooth_le_audio_test", |
| 427 | test_suites: ["device-tests"], |
| 428 | defaults: [ |
| 429 | "fluoride_defaults", |
| 430 | "clang_coverage_bin", |
| 431 | ], |
| 432 | host_supported: true, |
| 433 | include_dirs: [ |
| 434 | "packages/modules/Bluetooth/system", |
| 435 | "packages/modules/Bluetooth/system/bta/include", |
| 436 | "packages/modules/Bluetooth/system/bta/test/common", |
| 437 | "packages/modules/Bluetooth/system/btif/include", |
| 438 | "packages/modules/Bluetooth/system/gd", |
| 439 | "packages/modules/Bluetooth/system/stack/include", |
| 440 | ], |
| 441 | srcs : [ |
| 442 | ":TestStubOsi", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 443 | ":TestMockBtaLeAudioHalVerifier", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 444 | "test/common/bta_gatt_api_mock.cc", |
| 445 | "test/common/bta_gatt_queue_mock.cc", |
| 446 | "test/common/btm_api_mock.cc", |
| 447 | "le_audio/client_audio.cc", |
| 448 | "le_audio/client_audio_test.cc", |
| 449 | "le_audio/client_parser.cc", |
| 450 | "le_audio/client_parser_test.cc", |
| 451 | "le_audio/devices.cc", |
| 452 | "le_audio/devices_test.cc", |
| 453 | "le_audio/le_audio_types.cc", |
| 454 | "le_audio/le_audio_types_test.cc", |
| 455 | "le_audio/mock_iso_manager.cc", |
| 456 | "test/common/mock_controller.cc", |
| 457 | "le_audio/state_machine.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 458 | "le_audio/state_machine_test.cc", |
| 459 | "le_audio/mock_codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 460 | ], |
| 461 | shared_libs: [ |
| 462 | "libprotobuf-cpp-lite", |
| 463 | "libcrypto", |
| 464 | "liblog", // __android_log_print |
| 465 | ], |
| 466 | static_libs : [ |
| 467 | "libgmock", |
| 468 | "libbt-common", |
| 469 | "libbt-protos-lite", |
| 470 | "libosi", |
| 471 | ], |
| 472 | sanitize: { |
| 473 | cfi: false, |
| 474 | }, |
| 475 | } |
| 476 | |
| 477 | cc_test { |
| 478 | name: "bluetooth_le_audio_client_test", |
| 479 | test_suites: ["device-tests"], |
| 480 | defaults: [ |
| 481 | "fluoride_bta_defaults", |
| 482 | "clang_coverage_bin", |
| 483 | ], |
| 484 | host_supported: true, |
| 485 | include_dirs: [ |
| 486 | "packages/modules/Bluetooth/system", |
| 487 | "packages/modules/Bluetooth/system/bta/include", |
| 488 | "packages/modules/Bluetooth/system/bta/test/common", |
| 489 | "packages/modules/Bluetooth/system/stack/include", |
| 490 | ], |
| 491 | srcs : [ |
Łukasz Rymanowski | af2d951 | 2022-01-20 22:23:14 +0000 | [diff] [blame] | 492 | ":TestStubOsi", |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 493 | ":TestMockBtaLeAudioHalVerifier", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 494 | "gatt/database.cc", |
| 495 | "gatt/database_builder.cc", |
| 496 | "le_audio/client.cc", |
| 497 | "le_audio/client_parser.cc", |
| 498 | "le_audio/devices.cc", |
| 499 | "le_audio/le_audio_client_test.cc", |
| 500 | "le_audio/le_audio_types.cc", |
| 501 | "le_audio/mock_iso_manager.cc", |
| 502 | "le_audio/mock_le_audio_client_audio.cc", |
| 503 | "le_audio/mock_state_machine.cc", |
| 504 | "test/common/btm_api_mock.cc", |
| 505 | "test/common/bta_gatt_api_mock.cc", |
| 506 | "test/common/bta_gatt_queue_mock.cc", |
| 507 | "test/common/btif_storage_mock.cc", |
| 508 | "test/common/mock_csis_client.cc", |
| 509 | "test/common/mock_controller.cc", |
| 510 | "test/common/mock_device_groups.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame] | 511 | "le_audio/mock_codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 512 | ], |
| 513 | shared_libs: [ |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 514 | "android.hardware.bluetooth.audio@2.0", |
| 515 | "android.hardware.bluetooth.audio@2.1", |
Alice Kuo | c5275a3 | 2021-11-08 22:42:52 +0800 | [diff] [blame] | 516 | "android.hardware.bluetooth.audio@2.2", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 517 | "libprotobuf-cpp-lite", |
| 518 | "libcrypto", |
| 519 | "liblog", |
| 520 | ], |
| 521 | static_libs : [ |
| 522 | "crypto_toolbox_for_tests", |
| 523 | "libgmock", |
| 524 | "libbt-common", |
| 525 | "libbt-protos-lite", |
| 526 | "libosi", |
| 527 | "liblc3codec", |
Jakub Pawlowski | d0a41af | 2022-01-03 17:53:02 +0100 | [diff] [blame] | 528 | "liblc3", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 529 | ], |
| 530 | sanitize: { |
| 531 | cfi: true, |
| 532 | scs: true, |
| 533 | address: true, |
| 534 | all_undefined: true, |
| 535 | integer_overflow: true, |
| 536 | diag: { |
| 537 | undefined : true |
| 538 | }, |
| 539 | }, |
| 540 | } |
| 541 | |
Jakub Tyszkowski | 8604826 | 2021-12-13 12:32:59 +0100 | [diff] [blame^] | 542 | cc_test { |
| 543 | name: "bluetooth_test_broadcaster_sm", |
| 544 | test_suites: ["device-tests"], |
| 545 | defaults: [ |
| 546 | "fluoride_bta_defaults", |
| 547 | "clang_coverage_bin", |
| 548 | ], |
| 549 | host_supported: true, |
| 550 | include_dirs: [ |
| 551 | "packages/modules/Bluetooth/system", |
| 552 | "packages/modules/Bluetooth/system/bta/include", |
| 553 | "packages/modules/Bluetooth/system/bta/le_audio", |
| 554 | "packages/modules/Bluetooth/system/btif/include", |
| 555 | "packages/modules/Bluetooth/system/stack/include", |
| 556 | "packages/modules/Bluetooth/system/stack/btm", |
| 557 | ], |
| 558 | srcs : [ |
| 559 | "le_audio/broadcaster/broadcaster_types.cc", |
| 560 | "le_audio/broadcaster/mock_ble_advertising_manager.cc", |
| 561 | "le_audio/broadcaster/state_machine.cc", |
| 562 | "le_audio/broadcaster/state_machine_test.cc", |
| 563 | "le_audio/le_audio_types.cc", |
| 564 | "le_audio/mock_iso_manager.cc", |
| 565 | ], |
| 566 | shared_libs: [ |
| 567 | "libprotobuf-cpp-lite", |
| 568 | "libcrypto", |
| 569 | ], |
| 570 | static_libs : [ |
| 571 | "libgmock", |
| 572 | "libbt-common", |
| 573 | "libbt-protos-lite", |
| 574 | "liblc3", |
| 575 | ], |
| 576 | sanitize: { |
| 577 | cfi: true, |
| 578 | scs: true, |
| 579 | address: true, |
| 580 | all_undefined: true, |
| 581 | integer_overflow: true, |
| 582 | diag: { |
| 583 | undefined : true |
| 584 | }, |
| 585 | }, |
| 586 | } |
| 587 | |
| 588 | cc_test { |
| 589 | name: "bluetooth_test_broadcaster", |
| 590 | test_suites: ["device-tests"], |
| 591 | defaults: [ |
| 592 | "fluoride_bta_defaults", |
| 593 | "clang_coverage_bin", |
| 594 | ], |
| 595 | host_supported: true, |
| 596 | include_dirs: [ |
| 597 | "packages/modules/Bluetooth/system", |
| 598 | "packages/modules/Bluetooth/system/bta/include", |
| 599 | "packages/modules/Bluetooth/system/bta/le_audio", |
| 600 | "packages/modules/Bluetooth/system/bta/test/common", |
| 601 | "packages/modules/Bluetooth/system/btcore/include", |
| 602 | "packages/modules/Bluetooth/system/btif/include", |
| 603 | "packages/modules/Bluetooth/system/stack/include", |
| 604 | "packages/modules/Bluetooth/system/stack/btm", |
| 605 | ], |
| 606 | srcs : [ |
| 607 | ":TestStubOsi", |
| 608 | "le_audio/broadcaster/broadcaster.cc", |
| 609 | "le_audio/broadcaster/broadcaster_test.cc", |
| 610 | "le_audio/broadcaster/broadcaster_types.cc", |
| 611 | "le_audio/broadcaster/mock_ble_advertising_manager.cc", |
| 612 | "le_audio/broadcaster/mock_state_machine.cc", |
| 613 | "le_audio/le_audio_types.cc", |
| 614 | "le_audio/mock_iso_manager.cc", |
| 615 | "le_audio/mock_le_audio_client_audio.cc", |
| 616 | "test/common/mock_controller.cc", |
| 617 | ], |
| 618 | shared_libs: [ |
| 619 | "libprotobuf-cpp-lite", |
| 620 | "libcrypto", |
| 621 | ], |
| 622 | static_libs : [ |
| 623 | "libgmock", |
| 624 | "libbt-common", |
| 625 | "libbt-protos-lite", |
| 626 | "libosi", |
| 627 | "liblc3", |
| 628 | ], |
| 629 | sanitize: { |
| 630 | cfi: true, |
| 631 | scs: true, |
| 632 | address: true, |
| 633 | all_undefined: true, |
| 634 | integer_overflow: true, |
| 635 | diag: { |
| 636 | undefined : true |
| 637 | }, |
| 638 | }, |
| 639 | } |