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", |
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", |
| 101 | "le_audio/le_audio_types.cc", |
Jakub Pawlowski | 7d06e57 | 2018-02-28 22:44:42 -0800 | [diff] [blame] | 102 | "hearing_aid/hearing_aid.cc", |
Hansong Zhang | d19e027 | 2018-01-19 12:23:57 -0800 | [diff] [blame] | 103 | "hearing_aid/hearing_aid_audio_source.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 104 | "hf_client/bta_hf_client_act.cc", |
| 105 | "hf_client/bta_hf_client_api.cc", |
| 106 | "hf_client/bta_hf_client_at.cc", |
| 107 | "hf_client/bta_hf_client_main.cc", |
| 108 | "hf_client/bta_hf_client_rfc.cc", |
| 109 | "hf_client/bta_hf_client_sco.cc", |
| 110 | "hf_client/bta_hf_client_sdp.cc", |
| 111 | "hh/bta_hh_act.cc", |
| 112 | "hh/bta_hh_api.cc", |
| 113 | "hh/bta_hh_cfg.cc", |
| 114 | "hh/bta_hh_le.cc", |
| 115 | "hh/bta_hh_main.cc", |
| 116 | "hh/bta_hh_utils.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 117 | "hd/bta_hd_act.cc", |
| 118 | "hd/bta_hd_api.cc", |
| 119 | "hd/bta_hd_main.cc", |
| 120 | "jv/bta_jv_act.cc", |
| 121 | "jv/bta_jv_api.cc", |
| 122 | "jv/bta_jv_cfg.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 123 | "pan/bta_pan_act.cc", |
| 124 | "pan/bta_pan_api.cc", |
| 125 | "pan/bta_pan_ci.cc", |
| 126 | "pan/bta_pan_main.cc", |
| 127 | "sdp/bta_sdp.cc", |
| 128 | "sdp/bta_sdp_act.cc", |
| 129 | "sdp/bta_sdp_api.cc", |
| 130 | "sdp/bta_sdp_cfg.cc", |
| 131 | "sys/bta_sys_conn.cc", |
| 132 | "sys/bta_sys_main.cc", |
| 133 | "sys/utl.cc", |
| 134 | ], |
Ajay Panicker | 0ad702c | 2018-03-16 17:13:50 -0700 | [diff] [blame] | 135 | static_libs: [ |
| 136 | "avrcp-target-service", |
| 137 | "lib-bt-packets", |
| 138 | ], |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 139 | shared_libs: [ |
| 140 | "android.hardware.bluetooth.audio@2.0", |
| 141 | "android.hardware.bluetooth.audio@2.1", |
Alice Kuo | c5275a3 | 2021-11-08 22:42:52 +0800 | [diff] [blame] | 142 | "android.hardware.bluetooth.audio@2.2", |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 143 | ], |
Hansong Zhang | 777b634 | 2021-02-23 15:52:11 -0800 | [diff] [blame] | 144 | host_supported: true, |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 145 | } |
| 146 | |
| 147 | // bta unit tests for target |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 148 | cc_test { |
| 149 | name: "net_test_bta", |
| 150 | defaults: ["fluoride_bta_defaults"], |
Yanfei Zhou | d243981 | 2018-08-28 10:58:52 +0800 | [diff] [blame] | 151 | test_suites: ["device-tests"], |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 152 | srcs: [ |
Chris Manton | 8fe4751 | 2021-09-24 13:30:54 -0700 | [diff] [blame] | 153 | ":TestMockStackBtm", |
| 154 | ":TestCommonMockFunctions", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 155 | "test/bta_hf_client_test.cc", |
Yanfei Zhou | d243981 | 2018-08-28 10:58:52 +0800 | [diff] [blame] | 156 | "test/bta_dm_cust_uuid_test.cc", |
Fei Zheng | a6d4be1 | 2019-12-25 10:45:51 +0800 | [diff] [blame] | 157 | "test/bta_dip_test.cc", |
Jakub Pawlowski | 6d3cb11 | 2018-04-18 07:31:30 -0700 | [diff] [blame] | 158 | "test/gatt/database_builder_test.cc", |
| 159 | "test/gatt/database_builder_sample_device_test.cc", |
| 160 | "test/gatt/database_test.cc", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 161 | ], |
| 162 | shared_libs: [ |
Hansong Zhang | 8bb04bb | 2018-12-12 14:52:00 -0800 | [diff] [blame] | 163 | "libcrypto", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 164 | "liblog", |
| 165 | "libprotobuf-cpp-lite", |
| 166 | ], |
| 167 | static_libs: [ |
HsingYuan Lo | 2d3da48 | 2020-08-18 09:30:32 +0200 | [diff] [blame] | 168 | "crypto_toolbox_for_tests", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 169 | "libbtcore", |
| 170 | "libbt-bta", |
Cheney Ni | 895430b | 2018-12-12 20:20:28 +0800 | [diff] [blame] | 171 | "libbt-audio-hal-interface", |
Jakub Pawlowski | f9f4585 | 2017-07-03 15:39:36 -0700 | [diff] [blame] | 172 | "libbluetooth-types", |
Jack He | 9a30a9f | 2018-03-03 00:03:25 -0800 | [diff] [blame] | 173 | "libbt-protos-lite", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 174 | "libosi", |
Jack He | 4282398 | 2018-08-15 12:38:37 -0700 | [diff] [blame] | 175 | "libbt-common", |
Jack He | 65b2a57 | 2016-12-07 18:25:17 -0800 | [diff] [blame] | 176 | ], |
| 177 | } |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 178 | |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 179 | cc_test { |
| 180 | name: "bt_host_test_bta", |
| 181 | defaults: ["fluoride_bta_defaults"], |
| 182 | test_suites: ["device-tests"], |
| 183 | host_supported: true, |
| 184 | include_dirs: [ |
| 185 | "packages/modules/Bluetooth/system", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 186 | "packages/modules/Bluetooth/system/gd", |
| 187 | ], |
| 188 | generated_headers: [ |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 189 | "BluetoothGeneratedDumpsysDataSchema_h", |
| 190 | "BluetoothGeneratedPackets_h", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 191 | ], |
| 192 | srcs: [ |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 193 | ":OsiCompatSources", |
Chris Manton | 847dc38 | 2021-05-12 10:08:48 -0700 | [diff] [blame] | 194 | ":TestCommonMainHandler", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 195 | ":TestMockBtif", |
| 196 | ":TestMockDevice", |
| 197 | ":TestMockMainShim", |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 198 | ":TestMockOsi", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 199 | ":TestMockStack", |
Chris Manton | 866c5da | 2021-07-15 22:21:18 -0700 | [diff] [blame] | 200 | "ar/bta_ar.cc", |
| 201 | "dm/bta_dm_api.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 202 | "dm/bta_dm_act.cc", |
| 203 | "dm/bta_dm_cfg.cc", |
| 204 | "dm/bta_dm_ci.cc", |
| 205 | "dm/bta_dm_main.cc", |
| 206 | "dm/bta_dm_pm.cc", |
| 207 | "gatt/bta_gattc_act.cc", |
| 208 | "gatt/bta_gattc_api.cc", |
| 209 | "gatt/bta_gattc_cache.cc", |
| 210 | "gatt/bta_gattc_main.cc", |
| 211 | "gatt/bta_gattc_queue.cc", |
| 212 | "gatt/bta_gattc_utils.cc", |
| 213 | "gatt/database.cc", |
| 214 | "gatt/database_builder.cc", |
| 215 | "hh/bta_hh_act.cc", |
Chris Manton | 847dc38 | 2021-05-12 10:08:48 -0700 | [diff] [blame] | 216 | "hh/bta_hh_api.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 217 | "hh/bta_hh_cfg.cc", |
| 218 | "hh/bta_hh_le.cc", |
| 219 | "hh/bta_hh_main.cc", |
| 220 | "hh/bta_hh_utils.cc", |
Chris Manton | 3dc9ad8 | 2021-10-10 17:23:19 -0700 | [diff] [blame] | 221 | "pan/bta_pan_act.cc", |
| 222 | "pan/bta_pan_api.cc", |
| 223 | "pan/bta_pan_main.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 224 | "sys/bta_sys_conn.cc", |
| 225 | "sys/bta_sys_main.cc", |
| 226 | "test/bta_dm_test.cc", |
Chris Manton | 607b8c0 | 2021-05-07 09:45:55 -0700 | [diff] [blame] | 227 | "test/bta_gatt_test.cc", |
Chris Manton | 3dc9ad8 | 2021-10-10 17:23:19 -0700 | [diff] [blame] | 228 | "test/bta_pan_test.cc", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 229 | ], |
| 230 | shared_libs: [ |
Yi Kong | 2fb33f8 | 2021-12-16 02:46:09 +0800 | [diff] [blame] | 231 | "libbase", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 232 | "libcrypto", |
Chris Manton | 6aa6c0d | 2021-04-30 15:21:38 -0700 | [diff] [blame] | 233 | "libflatbuffers-cpp", |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 234 | "liblog", |
| 235 | "libprotobuf-cpp-lite", |
| 236 | ], |
| 237 | static_libs: [ |
| 238 | "libbluetooth-types", |
| 239 | "libbt-common", |
| 240 | "libbt-protos-lite", |
| 241 | "libbtcore", |
| 242 | "libgmock", |
| 243 | ], |
Chris Manton | 29deec2 | 2021-07-14 10:03:54 -0700 | [diff] [blame] | 244 | sanitize: { |
| 245 | address: true, |
| 246 | cfi: true, |
| 247 | misc_undefined: ["bounds"], |
| 248 | }, |
Chris Manton | 445082d | 2021-02-07 20:26:22 -0800 | [diff] [blame] | 249 | } |
| 250 | |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 251 | // bta hf client add record tests for target |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 252 | cc_test { |
| 253 | name: "net_test_hf_client_add_record", |
| 254 | defaults: ["fluoride_defaults"], |
| 255 | test_suites: ["device-tests"], |
| 256 | include_dirs: [ |
| 257 | "packages/modules/Bluetooth/system", |
Chris Manton | 131f21c | 2021-06-08 17:38:06 -0700 | [diff] [blame] | 258 | "packages/modules/Bluetooth/system/gd", |
Song Gao | e2253a5 | 2019-12-10 10:36:17 +0800 | [diff] [blame] | 259 | "packages/modules/Bluetooth/system/bta/include", |
| 260 | "packages/modules/Bluetooth/system/bta/sys", |
| 261 | "packages/modules/Bluetooth/system/btif/include", |
| 262 | "packages/modules/Bluetooth/system/internal_include", |
| 263 | "packages/modules/Bluetooth/system/stack/include", |
| 264 | "packages/modules/Bluetooth/system/utils/include", |
| 265 | ], |
| 266 | srcs: [ |
| 267 | "test/bta_hf_client_add_record_test.cc", |
| 268 | ], |
| 269 | header_libs: ["libbluetooth_headers"], |
| 270 | shared_libs: [ |
| 271 | "libcutils", |
| 272 | "liblog", |
| 273 | ], |
| 274 | static_libs: [ |
| 275 | "libbluetooth-types", |
| 276 | "libosi", |
| 277 | ], |
| 278 | cflags: ["-DBUILDCFG"], |
| 279 | } |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 280 | |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 281 | // csis unit tests for host |
| 282 | cc_test { |
| 283 | name: "bluetooth_csis_test", |
| 284 | test_suites: ["device-tests"], |
| 285 | defaults: [ |
| 286 | "fluoride_bta_defaults", |
| 287 | "clang_coverage_bin", |
| 288 | ], |
| 289 | host_supported: true, |
| 290 | include_dirs: [ |
| 291 | "packages/modules/Bluetooth/system", |
| 292 | "packages/modules/Bluetooth/system/bta/groups", |
| 293 | "packages/modules/Bluetooth/system/bta/include", |
| 294 | "packages/modules/Bluetooth/system/bta/test/common", |
| 295 | "packages/modules/Bluetooth/system/btif/include", |
| 296 | "packages/modules/Bluetooth/system/osi/include", |
| 297 | ], |
| 298 | srcs : [ |
| 299 | ":TestMockBtif", |
Chienyuan | 9c8568e | 2021-11-15 20:01:15 +0800 | [diff] [blame] | 300 | ":TestMockMainShimLeScanning", |
Łukasz Rymanowski | 06a5be2 | 2020-12-15 09:14:51 +0000 | [diff] [blame] | 301 | "csis/csis_client.cc", |
| 302 | "csis/csis_client_test.cc", |
| 303 | "groups/groups.cc", |
| 304 | "gatt/database.cc", |
| 305 | "gatt/database_builder.cc", |
| 306 | "test/common/bta_dm_api_mock.cc", |
| 307 | "test/common/bta_gatt_api_mock.cc", |
| 308 | "test/common/bta_gatt_queue_mock.cc", |
| 309 | "test/common/btm_api_mock.cc", |
| 310 | ], |
| 311 | shared_libs: [ |
| 312 | "libprotobuf-cpp-lite", |
| 313 | "libcrypto", |
| 314 | ], |
| 315 | static_libs : [ |
| 316 | "crypto_toolbox_for_tests", |
| 317 | "libgmock", |
| 318 | "libbt-common", |
| 319 | "libbt-protos-lite", |
| 320 | "libosi", |
| 321 | ], |
| 322 | sanitize: { |
| 323 | cfi: true, |
| 324 | scs: true, |
| 325 | address: true, |
| 326 | all_undefined: true, |
| 327 | integer_overflow: true, |
| 328 | diag: { |
| 329 | undefined : true |
| 330 | }, |
| 331 | }, |
| 332 | } |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 333 | |
Łukasz Rymanowski | a6b8333 | 2020-12-13 07:12:57 +0000 | [diff] [blame] | 334 | // groups unit tests for host |
| 335 | cc_test { |
| 336 | name: "bluetooth_groups_test", |
| 337 | test_suites: ["device-tests"], |
| 338 | defaults: [ |
| 339 | "fluoride_bta_defaults", |
| 340 | "clang_coverage_bin", |
| 341 | ], |
| 342 | host_supported: true, |
| 343 | include_dirs: [ |
| 344 | "packages/modules/Bluetooth/system", |
| 345 | "packages/modules/Bluetooth/system/bta/include", |
| 346 | ], |
| 347 | srcs : [ |
| 348 | ":TestMockBtif", |
| 349 | "groups/groups_test.cc", |
| 350 | "groups/groups.cc", |
| 351 | ], |
| 352 | shared_libs: [ |
| 353 | "libprotobuf-cpp-lite", |
| 354 | "libcrypto", |
| 355 | ], |
| 356 | static_libs : [ |
| 357 | "crypto_toolbox_for_tests", |
| 358 | "libgmock", |
| 359 | "libbt-common", |
| 360 | "libbt-protos-lite", |
| 361 | "libosi", |
| 362 | ], |
| 363 | sanitize: { |
| 364 | cfi: true, |
| 365 | scs: true, |
| 366 | address: true, |
| 367 | all_undefined: true, |
| 368 | integer_overflow: true, |
| 369 | diag: { |
| 370 | undefined : true |
| 371 | }, |
| 372 | }, |
| 373 | } |
| 374 | |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 375 | // bta unit tests for host |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 376 | cc_test { |
| 377 | name: "bluetooth_vc_test", |
| 378 | test_suites: ["device-tests"], |
| 379 | defaults: [ |
| 380 | "fluoride_bta_defaults", |
| 381 | "clang_coverage_bin", |
| 382 | ], |
| 383 | host_supported: true, |
| 384 | include_dirs: [ |
| 385 | "packages/modules/Bluetooth/system", |
| 386 | "packages/modules/Bluetooth/system/bta/include", |
| 387 | "packages/modules/Bluetooth/system/bta/test/common", |
| 388 | "packages/modules/Bluetooth/system/stack/include", |
| 389 | ], |
| 390 | srcs : [ |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 391 | ":TestMockOsi", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 392 | "gatt/database.cc", |
| 393 | "gatt/database_builder.cc", |
| 394 | "test/common/bta_gatt_api_mock.cc", |
| 395 | "test/common/bta_gatt_queue_mock.cc", |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 396 | "test/common/mock_csis_client.cc", |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 397 | "test/common/btm_api_mock.cc", |
| 398 | "vc/devices_test.cc", |
| 399 | "vc/device.cc", |
| 400 | "vc/vc.cc", |
| 401 | "vc/vc_test.cc", |
| 402 | ], |
| 403 | shared_libs: [ |
| 404 | "libprotobuf-cpp-lite", |
| 405 | "libcrypto", |
| 406 | ], |
| 407 | static_libs : [ |
| 408 | "crypto_toolbox_for_tests", |
| 409 | "libgmock", |
| 410 | "libbt-common", |
| 411 | "libbt-protos-lite", |
Łukasz Rymanowski | 3e62085 | 2021-08-25 16:46:05 +0000 | [diff] [blame] | 412 | "libosi" |
Łukasz Rymanowski | 35b0836 | 2021-01-29 09:05:10 +0000 | [diff] [blame] | 413 | ], |
| 414 | sanitize: { |
| 415 | cfi: false, |
| 416 | }, |
| 417 | } |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 418 | |
| 419 | // bta unit tests for LE Audio |
| 420 | // ======================================================== |
| 421 | cc_test { |
| 422 | name: "bluetooth_le_audio_test", |
| 423 | test_suites: ["device-tests"], |
| 424 | defaults: [ |
| 425 | "fluoride_defaults", |
| 426 | "clang_coverage_bin", |
| 427 | ], |
| 428 | host_supported: true, |
| 429 | include_dirs: [ |
| 430 | "packages/modules/Bluetooth/system", |
| 431 | "packages/modules/Bluetooth/system/bta/include", |
| 432 | "packages/modules/Bluetooth/system/bta/test/common", |
| 433 | "packages/modules/Bluetooth/system/btif/include", |
| 434 | "packages/modules/Bluetooth/system/gd", |
| 435 | "packages/modules/Bluetooth/system/stack/include", |
| 436 | ], |
| 437 | srcs : [ |
| 438 | ":TestStubOsi", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame^] | 439 | ":TestMockBtaLeAudioHalVerifier", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 440 | "test/common/bta_gatt_api_mock.cc", |
| 441 | "test/common/bta_gatt_queue_mock.cc", |
| 442 | "test/common/btm_api_mock.cc", |
| 443 | "le_audio/client_audio.cc", |
| 444 | "le_audio/client_audio_test.cc", |
| 445 | "le_audio/client_parser.cc", |
| 446 | "le_audio/client_parser_test.cc", |
| 447 | "le_audio/devices.cc", |
| 448 | "le_audio/devices_test.cc", |
| 449 | "le_audio/le_audio_types.cc", |
| 450 | "le_audio/le_audio_types_test.cc", |
| 451 | "le_audio/mock_iso_manager.cc", |
| 452 | "test/common/mock_controller.cc", |
| 453 | "le_audio/state_machine.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame^] | 454 | "le_audio/state_machine_test.cc", |
| 455 | "le_audio/mock_codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 456 | ], |
| 457 | shared_libs: [ |
| 458 | "libprotobuf-cpp-lite", |
| 459 | "libcrypto", |
| 460 | "liblog", // __android_log_print |
| 461 | ], |
| 462 | static_libs : [ |
| 463 | "libgmock", |
| 464 | "libbt-common", |
| 465 | "libbt-protos-lite", |
| 466 | "libosi", |
| 467 | ], |
| 468 | sanitize: { |
| 469 | cfi: false, |
| 470 | }, |
| 471 | } |
| 472 | |
| 473 | cc_test { |
| 474 | name: "bluetooth_le_audio_client_test", |
| 475 | test_suites: ["device-tests"], |
| 476 | defaults: [ |
| 477 | "fluoride_bta_defaults", |
| 478 | "clang_coverage_bin", |
| 479 | ], |
| 480 | host_supported: true, |
| 481 | include_dirs: [ |
| 482 | "packages/modules/Bluetooth/system", |
| 483 | "packages/modules/Bluetooth/system/bta/include", |
| 484 | "packages/modules/Bluetooth/system/bta/test/common", |
| 485 | "packages/modules/Bluetooth/system/stack/include", |
| 486 | ], |
| 487 | srcs : [ |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 488 | ":TestMockBtaLeAudioHalVerifier", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 489 | "gatt/database.cc", |
| 490 | "gatt/database_builder.cc", |
| 491 | "le_audio/client.cc", |
| 492 | "le_audio/client_parser.cc", |
| 493 | "le_audio/devices.cc", |
| 494 | "le_audio/le_audio_client_test.cc", |
| 495 | "le_audio/le_audio_types.cc", |
| 496 | "le_audio/mock_iso_manager.cc", |
| 497 | "le_audio/mock_le_audio_client_audio.cc", |
| 498 | "le_audio/mock_state_machine.cc", |
| 499 | "test/common/btm_api_mock.cc", |
| 500 | "test/common/bta_gatt_api_mock.cc", |
| 501 | "test/common/bta_gatt_queue_mock.cc", |
| 502 | "test/common/btif_storage_mock.cc", |
| 503 | "test/common/mock_csis_client.cc", |
| 504 | "test/common/mock_controller.cc", |
| 505 | "test/common/mock_device_groups.cc", |
Alice Kuo | 422f55d | 2021-12-30 11:33:32 +0800 | [diff] [blame^] | 506 | "le_audio/mock_codec_manager.cc", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 507 | ], |
| 508 | shared_libs: [ |
Abhishek Pandit-Subedi | e404389 | 2021-10-15 11:39:36 -0700 | [diff] [blame] | 509 | "android.hardware.bluetooth.audio@2.0", |
| 510 | "android.hardware.bluetooth.audio@2.1", |
Alice Kuo | c5275a3 | 2021-11-08 22:42:52 +0800 | [diff] [blame] | 511 | "android.hardware.bluetooth.audio@2.2", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 512 | "libprotobuf-cpp-lite", |
| 513 | "libcrypto", |
| 514 | "liblog", |
| 515 | ], |
| 516 | static_libs : [ |
| 517 | "crypto_toolbox_for_tests", |
| 518 | "libgmock", |
| 519 | "libbt-common", |
| 520 | "libbt-protos-lite", |
| 521 | "libosi", |
| 522 | "liblc3codec", |
Jakub Pawlowski | 02d57e6 | 2021-11-12 22:03:18 +0100 | [diff] [blame] | 523 | "liblc3encoder", |
Grzegorz Kołodziejczyk | 926fd43 | 2021-10-06 11:54:53 +0000 | [diff] [blame] | 524 | ], |
| 525 | sanitize: { |
| 526 | cfi: true, |
| 527 | scs: true, |
| 528 | address: true, |
| 529 | all_undefined: true, |
| 530 | integer_overflow: true, |
| 531 | diag: { |
| 532 | undefined : true |
| 533 | }, |
| 534 | }, |
| 535 | } |
| 536 | |