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