• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
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    //   SPDX-license-identifier-BSD
8    default_applicable_licenses: ["system_bt_license"],
9}
10
11crypto_toolbox_srcs = [
12    "crypto_toolbox/aes.cc",
13    "crypto_toolbox/aes_cmac.cc",
14    "crypto_toolbox/crypto_toolbox.cc",
15]
16
17cc_test_library {
18    name: "crypto_toolbox_for_tests",
19    defaults: ["fluoride_defaults"],
20    host_supported: true,
21    include_dirs: [
22        "system/bt",
23    ],
24    srcs: crypto_toolbox_srcs
25}
26
27// Bluetooth stack static library for target
28// ========================================================
29cc_library_static {
30    name: "libbt-stack",
31    defaults: ["fluoride_defaults"],
32    local_include_dirs: [
33        "include",
34        "avct",
35        "btm",
36        "avrc",
37        "l2cap",
38        "avdt",
39        "eatt",
40        "gatt",
41        "gap",
42        "pan",
43        "bnep",
44        "hid",
45        "metrics",
46        "sdp",
47        "smp",
48        "srvc",
49    ],
50    header_libs: [
51        "libbluetooth_headers",
52    ],
53    include_dirs: [
54        "external/aac/libAACenc/include",
55        "external/aac/libAACdec/include",
56        "external/aac/libSYS/include",
57        "external/libldac/inc",
58        "external/libldac/abr/inc",
59        "system/bt",
60        "system/bt/btcore/include",
61        "system/bt/vnd/include",
62        "system/bt/vnd/ble",
63        "system/bt/btif/include",
64        "system/bt/hci/include",
65        "system/bt/internal_include",
66        "system/bt/udrv/include",
67        "system/bt/bta/include",
68        "system/bt/bta/sys",
69        "system/bt/utils/include",
70        "system/bt/gd/rust/shim",
71    ],
72    srcs: crypto_toolbox_srcs + [
73        "a2dp/a2dp_aac.cc",
74        "a2dp/a2dp_aac_decoder.cc",
75        "a2dp/a2dp_aac_encoder.cc",
76        "a2dp/a2dp_api.cc",
77        "a2dp/a2dp_codec_config.cc",
78        "a2dp/a2dp_sbc.cc",
79        "a2dp/a2dp_sbc_decoder.cc",
80        "a2dp/a2dp_sbc_encoder.cc",
81        "a2dp/a2dp_sbc_up_sample.cc",
82        "a2dp/a2dp_vendor.cc",
83        "a2dp/a2dp_vendor_aptx.cc",
84        "a2dp/a2dp_vendor_aptx_hd.cc",
85        "a2dp/a2dp_vendor_aptx_encoder.cc",
86        "a2dp/a2dp_vendor_aptx_hd_encoder.cc",
87        "a2dp/a2dp_vendor_ldac.cc",
88        "a2dp/a2dp_vendor_ldac_abr.cc",
89        "a2dp/a2dp_vendor_ldac_decoder.cc",
90        "a2dp/a2dp_vendor_ldac_encoder.cc",
91        "avct/avct_api.cc",
92        "avct/avct_bcb_act.cc",
93        "avct/avct_ccb.cc",
94        "avct/avct_l2c.cc",
95        "avct/avct_l2c_br.cc",
96        "avct/avct_lcb.cc",
97        "avct/avct_lcb_act.cc",
98        "avdt/avdt_ad.cc",
99        "avdt/avdt_api.cc",
100        "avdt/avdt_ccb.cc",
101        "avdt/avdt_ccb_act.cc",
102        "avdt/avdt_l2c.cc",
103        "avdt/avdt_msg.cc",
104        "avdt/avdt_scb.cc",
105        "avdt/avdt_scb_act.cc",
106        "avrc/avrc_api.cc",
107        "avrc/avrc_bld_ct.cc",
108        "avrc/avrc_bld_tg.cc",
109        "avrc/avrc_opt.cc",
110        "avrc/avrc_pars_ct.cc",
111        "avrc/avrc_pars_tg.cc",
112        "avrc/avrc_sdp.cc",
113        "avrc/avrc_utils.cc",
114        "bnep/bnep_api.cc",
115        "bnep/bnep_main.cc",
116        "bnep/bnep_utils.cc",
117        "btm/ble_advertiser_hci_interface.cc",
118        "acl/acl.cc",
119        "acl/btm_acl.cc",
120        "acl/ble_acl.cc",
121        "btm/ble_scanner_hci_interface.cc",
122        "btm/btm_ble.cc",
123        "btm/btm_ble_addr.cc",
124        "btm/btm_ble_adv_filter.cc",
125        "btm/btm_ble_batchscan.cc",
126        "btm/btm_ble_bgconn.cc",
127        "acl/btm_ble_connection_establishment.cc",
128        "btm/btm_ble_cont_energy.cc",
129        "btm/btm_ble_gap.cc",
130        "btm/btm_ble_multi_adv.cc",
131        "btm/btm_ble_privacy.cc",
132        "btm/btm_client_interface.cc",
133        "btm/btm_dev.cc",
134        "btm/btm_devctl.cc",
135        "btm/btm_inq.cc",
136        "btm/btm_main.cc",
137        "acl/btm_pm.cc",
138        "btm/btm_sco.cc",
139        "btm/btm_iso.cc",
140        "btm/btm_sec.cc",
141        "btm/btm_scn.cc",
142        "btu/btu_hcif.cc",
143        "btu/btu_task.cc",
144        "eatt/eatt.cc",
145        "gap/gap_ble.cc",
146        "gap/gap_conn.cc",
147        "gatt/att_protocol.cc",
148        "gatt/connection_manager.cc",
149        "gatt/gatt_api.cc",
150        "gatt/gatt_attr.cc",
151        "gatt/gatt_auth.cc",
152        "gatt/gatt_cl.cc",
153        "gatt/gatt_db.cc",
154        "gatt/gatt_main.cc",
155        "gatt/gatt_sr.cc",
156        "gatt/gatt_sr_hash.cc",
157        "gatt/gatt_utils.cc",
158        "hcic/hciblecmds.cc",
159        "hcic/hcicmds.cc",
160        "hid/hidh_api.cc",
161        "hid/hidh_conn.cc",
162        "hid/hidd_api.cc",
163        "hid/hidd_conn.cc",
164        "l2cap/l2c_api.cc",
165        "l2cap/l2c_ble.cc",
166        "l2cap/l2c_csm.cc",
167        "l2cap/l2c_fcr.cc",
168        "l2cap/l2c_link.cc",
169        "l2cap/l2c_main.cc",
170        "l2cap/l2c_utils.cc",
171        "metrics/stack_metrics_logging.cc",
172        "pan/pan_api.cc",
173        "pan/pan_main.cc",
174        "pan/pan_utils.cc",
175        "rfcomm/port_api.cc",
176        "rfcomm/port_rfc.cc",
177        "rfcomm/port_utils.cc",
178        "rfcomm/rfc_l2cap_if.cc",
179        "rfcomm/rfc_mx_fsm.cc",
180        "rfcomm/rfc_port_fsm.cc",
181        "rfcomm/rfc_port_if.cc",
182        "rfcomm/rfc_ts_frames.cc",
183        "rfcomm/rfc_utils.cc",
184        "sdp/sdp_api.cc",
185        "sdp/sdp_db.cc",
186        "sdp/sdp_discovery.cc",
187        "sdp/sdp_main.cc",
188        "sdp/sdp_server.cc",
189        "sdp/sdp_utils.cc",
190        "smp/p_256_curvepara.cc",
191        "smp/p_256_ecc_pp.cc",
192        "smp/p_256_multprecision.cc",
193        "smp/smp_act.cc",
194        "smp/smp_api.cc",
195        "smp/smp_br_main.cc",
196        "smp/smp_keys.cc",
197        "smp/smp_l2c.cc",
198        "smp/smp_main.cc",
199        "smp/smp_utils.cc",
200        "srvc/srvc_dis.cc",
201        "srvc/srvc_eng.cc",
202    ],
203    static_libs: [
204        "libbt-hci",
205        "libFraunhoferAAC",
206    ],
207    shared_libs: [
208        "libcutils",
209        "liblog",
210        "libcrypto",
211    ],
212    required: [
213        "libldacBT_enc",
214        "libldacBT_abr",
215    ],
216    host_supported: true,
217}
218
219// Bluetooth stack unit tests for target
220// ========================================================
221cc_test {
222    name: "net_test_stack",
223    defaults: ["fluoride_defaults"],
224    test_suites: ["device-tests"],
225    local_include_dirs: [
226        "include",
227    ],
228    include_dirs: [
229        "system/bt",
230        "system/bt/internal_include",
231    ],
232    srcs: [
233        "test/stack_a2dp_test.cc",
234        "test/stack_avrcp_test.cc",
235    ],
236    shared_libs: [
237        "android.hardware.bluetooth@1.0",
238        "android.hardware.bluetooth@1.1",
239        "android.hardware.bluetooth.a2dp@1.0",
240        "android.hardware.bluetooth.audio@2.0",
241        "android.hardware.bluetooth.audio@2.1",
242        "android.system.suspend.control-V1-ndk",
243        "libaaudio",
244        "libbinder_ndk",
245        "libcutils",
246        "libdl",
247        "libfmq",
248        "libhidlbase",
249        "liblog",
250        "libprocessgroup",
251        "libprotobuf-cpp-lite",
252        "libutils",
253        "libtinyxml2",
254        "libz",
255        "libcrypto",
256    ],
257    static_libs: [
258        "libbt-audio-hal-interface",
259        "libbtcore",
260        "libbt-bta",
261        "libbt-stack",
262        "libbt-common",
263        "libbt-sbc-decoder",
264        "libbt-sbc-encoder",
265        "libbt-utils",
266        "libbtif",
267        "libFraunhoferAAC",
268        "libbt-hci",
269        "libbtdevice",
270        "libg722codec",
271        "libosi",
272        "libudrv-uipc",
273        "libbt-protos-lite",
274    ],
275    whole_static_libs: [
276        "libbluetooth-for-tests",
277    ],
278}
279
280cc_test {
281    name: "net_test_stack_rfcomm",
282    defaults: ["fluoride_defaults"],
283    test_suites: ["device-tests"],
284    host_supported: true,
285    local_include_dirs: [
286        "include",
287        "btm",
288        "l2cap",
289        "smp",
290        "rfcomm",
291        "test/common",
292    ],
293    include_dirs: [
294        "system/bt",
295        "system/bt/internal_include",
296        "system/bt/btcore/include",
297        "system/bt/hci/include",
298        "system/bt/utils/include",
299    ],
300    srcs: [
301        "rfcomm/port_api.cc",
302        "rfcomm/port_rfc.cc",
303        "rfcomm/port_utils.cc",
304        "rfcomm/rfc_l2cap_if.cc",
305        "rfcomm/rfc_mx_fsm.cc",
306        "rfcomm/rfc_port_fsm.cc",
307        "rfcomm/rfc_port_if.cc",
308        "rfcomm/rfc_ts_frames.cc",
309        "rfcomm/rfc_utils.cc",
310        "test/common/mock_btm_layer.cc",
311        "test/common/mock_btsnoop_module.cc",
312        "test/common/mock_btu_layer.cc",
313        "test/common/mock_l2cap_layer.cc",
314        "test/common/stack_test_packet_utils.cc",
315        "test/rfcomm/stack_rfcomm_test.cc",
316        "test/rfcomm/stack_rfcomm_test_main.cc",
317        "test/rfcomm/stack_rfcomm_test_utils.cc",
318        "test/rfcomm/stack_rfcomm_test_utils_test.cc",
319    ],
320    shared_libs: [
321        "libcutils",
322        "libprotobuf-cpp-lite",
323        "libcrypto",
324    ],
325    static_libs: [
326        "liblog",
327        "libgmock",
328        "libosi",
329        "libbt-common",
330        "libbt-protos-lite",
331    ],
332    sanitize: {
333        cfi: false,
334    },
335}
336
337// Bluetooth stack smp unit tests for target
338// ========================================================
339cc_test {
340    name: "net_test_stack_smp",
341    defaults: ["fluoride_defaults"],
342    test_suites: ["device-tests"],
343    local_include_dirs: [
344        "include",
345        "btm",
346        "l2cap",
347        "smp",
348    ],
349    include_dirs: [
350        "system/bt",
351        "system/bt/internal_include",
352        "system/bt/btcore/include",
353        "system/bt/hci/include",
354        "system/bt/utils/include",
355    ],
356    srcs: crypto_toolbox_srcs + [
357        "smp/smp_keys.cc",
358        "smp/p_256_curvepara.cc",
359        "smp/p_256_ecc_pp.cc",
360        "smp/p_256_multprecision.cc",
361        "smp/smp_api.cc",
362        "smp/smp_main.cc",
363        "smp/smp_utils.cc",
364        "test/crypto_toolbox_test.cc",
365        "test/stack_smp_test.cc",
366    ],
367    shared_libs: [
368        "libcutils",
369        "libcrypto",
370    ],
371    static_libs: [
372        "liblog",
373        "libgmock",
374        "libosi",
375    ],
376}
377
378// Bluetooth stack multi-advertising unit tests for target
379// ========================================================
380cc_test {
381    name: "net_test_stack_multi_adv",
382    defaults: ["fluoride_defaults"],
383    test_suites: ["device-tests"],
384    local_include_dirs: [
385        "include",
386        "btm",
387    ],
388    include_dirs: [
389        "system/bt",
390        "system/bt/internal_include",
391        "system/bt/btcore/include",
392        "system/bt/hci/include",
393        "system/bt/internal_include",
394        "system/bt/utils/include",
395    ],
396    srcs: [
397        "btm/btm_ble_multi_adv.cc",
398        "test/ble_advertiser_test.cc",
399    ],
400    shared_libs: [
401        "libcutils",
402    ],
403    static_libs: [
404        "libbluetooth-types",
405        "liblog",
406        "libgmock",
407    ],
408    sanitize: {
409        cfi: false,
410    },
411}
412
413// Bluetooth stack advertise data parsing unit tests for target
414// =============================================================
415cc_test {
416    name: "net_test_stack_ad_parser",
417    defaults: ["fluoride_defaults"],
418    test_suites: ["device-tests"],
419    local_include_dirs: [
420        "include",
421    ],
422    srcs: [
423        "test/ad_parser_unittest.cc",
424    ],
425    static_libs: [
426        "libbluetooth-types",
427        "liblog",
428        "libgmock",
429    ],
430}
431
432// Bluetooth stack connection multiplexing
433// ========================================================
434cc_test {
435    name: "net_test_gatt_conn_multiplexing",
436    defaults: ["fluoride_defaults"],
437    local_include_dirs: [
438        "include",
439        "btm",
440    ],
441    include_dirs: [
442        "system/bt",
443        "system/bt/internal_include",
444        "system/bt/btcore/include",
445        "system/bt/hci/include",
446        "system/bt/internal_include",
447        "system/bt/utils/include",
448    ],
449    srcs: [
450        "gatt/connection_manager.cc",
451        "test/gatt_connection_manager_test.cc",
452    ],
453    shared_libs: [
454        "libcutils",
455    ],
456    static_libs: [
457        "libbluetooth-types",
458        "liblog",
459        "libgmock",
460    ],
461    sanitize: {
462        cfi: false,
463    },
464}
465
466cc_test {
467    name: "net_test_stack_gatt_native",
468    defaults: ["fluoride_defaults"],
469    test_suites: ["device-tests"],
470    host_supported: true,
471    test_options: {
472        unit_test: true,
473    },
474    include_dirs: [
475        "system/bt",
476        "system/bt/stack/include",
477        "system/bt/stack/eatt",
478        "system/bt/stack/l2cap",
479        "system/bt/stack/btm",
480        "system/bt/utils/include",
481    ],
482    srcs: [
483        "gatt/gatt_utils.cc",
484        "test/common/mock_acl.cc",
485        "test/common/mock_eatt.cc",
486        "test/common/mock_gatt_layer.cc",
487        "test/common/mock_main_shim.cc",
488        "test/gatt/gatt_sr_test.cc",
489    ],
490    shared_libs: [
491        "libcutils",
492        "libprotobuf-cpp-lite",
493        "libcrypto",
494    ],
495    static_libs: [
496        "liblog",
497        "libosi",
498        "libbt-common",
499        "libbt-protos-lite",
500        "libgmock",
501        "libosi-AllocationTestHarness",
502    ],
503    sanitize: {
504        address: true,
505        cfi: true,
506        misc_undefined: ["bounds"],
507    },
508}
509
510cc_test {
511    name: "net_test_stack_avdtp",
512    defaults: ["fluoride_defaults"],
513    test_suites: ["device-tests"],
514    host_supported: true,
515    test_options: {
516        unit_test: true,
517    },
518    include_dirs: [
519        "external/libldac/inc",
520        "system/bt",
521        "system/bt/stack/include",
522        "system/bt/utils/include",
523    ],
524    srcs: [
525        "test/stack_avdtp_test.cc",
526        "avdt/avdt_ad.cc",
527        "avdt/avdt_api.cc",
528        "avdt/avdt_ccb.cc",
529        "avdt/avdt_ccb_act.cc",
530        "avdt/avdt_l2c.cc",
531        "avdt/avdt_scb.cc",
532        "avdt/avdt_scb_act.cc",
533        "test/common/mock_btu_layer.cc",
534        "test/common/mock_stack_avdt_msg.cc",
535        ":TestMockStackL2cap",
536        ":TestMockStackAcl",
537        ":TestMockStackA2dp",
538        ":TestMockBta",
539        ":TestMockDevice",
540    ],
541    shared_libs: [
542        "libcrypto",
543        "libcutils",
544        "libprotobuf-cpp-lite",
545    ],
546    static_libs: [
547        "libbt-common",
548        "libbt-protos-lite",
549        "liblog",
550        "libosi",
551        "libosi-AllocationTestHarness",
552    ],
553    sanitize: {
554        address: true,
555        cfi: true,
556        misc_undefined: ["bounds"],
557    },
558}
559
560cc_test {
561    name: "net_test_stack_a2dp_native",
562    defaults: ["fluoride_defaults"],
563    test_suites: ["device-tests"],
564    host_supported: true,
565    test_options: {
566        unit_test: true,
567    },
568    include_dirs: [
569        "external/libldac/inc",
570        "system/bt",
571        "system/bt/stack/include",
572    ],
573    srcs: [
574        "test/a2dp/a2dp_vendor_ldac_decoder_test.cc",
575        "test/a2dp/misc_fake.cc",
576    ],
577    shared_libs: [
578        "libcrypto",
579        "libcutils",
580        "libprotobuf-cpp-lite",
581    ],
582    static_libs: [
583        "libbt-common",
584        "libbt-protos-lite",
585        "liblog",
586        "libosi",
587        "libosi-AllocationTestHarness",
588    ],
589    sanitize: {
590        address: true,
591        cfi: true,
592        misc_undefined: ["bounds"],
593    },
594}
595
596// gatt sr hash test
597cc_test {
598    name: "net_test_stack_gatt_sr_hash_native",
599    defaults: ["fluoride_defaults"],
600    test_suites: ["device-tests"],
601    host_supported: true,
602    include_dirs: [
603        "system/bt",
604        "system/bt/stack/btm",
605        "system/bt/stack/eatt",
606        "system/bt/stack/include",
607        "system/bt/utils/include",
608    ],
609    srcs: crypto_toolbox_srcs + [
610        "gatt/gatt_db.cc",
611        "gatt/gatt_sr_hash.cc",
612        "gatt/gatt_utils.cc",
613        "test/common/mock_acl.cc",
614        "test/common/mock_eatt.cc",
615        "test/common/mock_gatt_layer.cc",
616        "test/common/mock_main_shim.cc",
617        "test/gatt/mock_gatt_utils_ref.cc",
618        "test/stack_gatt_sr_hash_test.cc",
619    ],
620    shared_libs: [
621        "libcutils",
622        "libcrypto",
623        "libprotobuf-cpp-lite",
624    ],
625    static_libs: [
626        "libbt-common",
627        "libbt-protos-lite",
628        "liblog",
629        "libgmock",
630        "libosi",
631    ],
632}
633
634// Iso manager unit tests
635cc_test {
636    name: "net_test_btm_iso",
637    test_suites: ["device-tests"],
638    host_supported: true,
639    test_options: {
640        unit_test: true,
641    },
642    defaults: ["fluoride_defaults"],
643    local_include_dirs: [
644        "btm",
645        "include",
646        "test/common",
647    ],
648    include_dirs: [
649        "system/bt",
650        "system/bt/btcore/include",
651    ],
652    srcs: [
653        "btm/btm_iso.cc",
654        "test/btm_iso_test.cc",
655        "test/common/mock_controller.cc",
656        "test/common/mock_gatt_layer.cc",
657        "test/common/mock_hcic_layer.cc",
658    ],
659    static_libs: [
660        "libbt-common",
661        "libgmock",
662        "liblog",
663        "libosi",
664    ],
665    sanitize: {
666        cfi: true,
667        scs: true,
668        address: true,
669        all_undefined: true,
670        integer_overflow: true,
671        diag: {
672            undefined : true
673        },
674    },
675}
676
677// EATT unit tests
678cc_test {
679    name: "net_test_eatt",
680    test_suites: ["device-tests"],
681    host_supported: true,
682    test_options: {
683        unit_test: true,
684    },
685    defaults: [
686        "fluoride_defaults",
687        "clang_coverage_bin",
688    ],
689    local_include_dirs: [
690        "include",
691        "btm",
692        "eatt",
693        "gatt",
694        "l2cap",
695        "test/common",
696    ],
697    include_dirs:[
698        "system/bt",
699        "system/bt/btcore/include",
700    ],
701    srcs: [
702        "eatt/eatt.cc",
703        "test/common/mock_btm_api_layer.cc",
704	"test/common/mock_btif_storage.cc",
705        "test/common/mock_controller.cc",
706        "test/common/mock_gatt_layer.cc",
707        "test/common/mock_l2cap_layer.cc",
708        "test/gatt/mock_gatt_utils_ref.cc",
709        "test/eatt/eatt_test.cc",
710    ],
711    shared_libs: [
712        "libcutils",
713        "libcrypto",
714        "libprotobuf-cpp-lite",
715    ],
716    static_libs: [
717        "libbt-common",
718        "libbt-protos-lite",
719        "liblog",
720        "libgmock",
721        "libosi",
722    ],
723    sanitize: {
724        cfi: false,
725    },
726}
727
728cc_test {
729    name: "net_test_stack_btm",
730    test_suites: ["device-tests"],
731    host_supported: true,
732    test_options: {
733        unit_test: true,
734    },
735    defaults: ["fluoride_defaults"],
736    local_include_dirs: [
737        "include",
738        "btm",
739        "test/common",
740    ],
741    include_dirs: [
742        "system/bt",
743        "system/bt/gd",
744        "system/bt/vnd/ble",
745    ],
746    generated_headers: [
747        "BluetoothGeneratedBundlerSchema_h_bfbs",
748        "BluetoothGeneratedDumpsysDataSchema_h",
749        "BluetoothGeneratedPackets_h",
750    ],
751    srcs: crypto_toolbox_srcs + [
752        ":BluetoothBtaaSources_host",
753        ":BluetoothHalSources_hci_host",
754        ":BluetoothOsSources_host",
755        ":TestMockBta",
756        ":TestMockBtif",
757        ":TestMockDevice",
758        ":TestMockLegacyHciCommands",
759        ":TestMockMainBte",
760        ":TestMockMainShim",
761        ":TestMockStackBtu",
762        ":TestMockStackGap",
763        ":TestMockStackGatt",
764        ":TestMockStackSmp",
765        ":TestStackL2cap",
766        "acl/acl.cc",
767        "acl/ble_acl.cc",
768        "acl/btm_acl.cc",
769        "acl/btm_ble_connection_establishment.cc",
770        "acl/btm_pm.cc",
771        "btm/ble_advertiser_hci_interface.cc",
772        "btm/btm_ble.cc",
773        "btm/btm_ble_addr.cc",
774        "btm/btm_ble_adv_filter.cc",
775        "btm/btm_ble_batchscan.cc",
776        "btm/btm_ble_bgconn.cc",
777        "btm/btm_ble_cont_energy.cc",
778        "btm/btm_ble_gap.cc",
779        "btm/btm_ble_multi_adv.cc",
780        "btm/btm_ble_privacy.cc",
781        "btm/btm_client_interface.cc",
782        "btm/btm_dev.cc",
783        "btm/btm_devctl.cc",
784        "btm/btm_inq.cc",
785        "btm/btm_iso.cc",
786        "btm/btm_main.cc",
787        "btm/btm_sco.cc",
788        "btm/btm_scn.cc",
789        "btm/btm_sec.cc",
790        "metrics/stack_metrics_logging.cc",
791        "test/btm/stack_btm_test.cc",
792        "test/btm/peer_packet_types_test.cc",
793    ],
794    static_libs: [
795        "libbt-common",
796        "libbt-protos-lite",
797        "libbtdevice",
798        "libgmock",
799        "liblog",
800        "libosi",
801    ],
802    shared_libs: [
803        "libcrypto",
804        "libflatbuffers-cpp",
805        "libprotobuf-cpp-lite",
806    ],
807    sanitize: {
808        address: true,
809        all_undefined: true,
810        cfi: true,
811        integer_overflow: true,
812        scs: true,
813        diag: {
814            undefined : true
815        },
816    },
817}
818
819cc_test {
820    name: "net_test_stack_hci",
821    test_suites: ["device-tests"],
822    host_supported: true,
823    defaults: ["fluoride_defaults"],
824    local_include_dirs: [
825        "include",
826        "btm",
827        "test/common",
828    ],
829    include_dirs: [
830        "system/bt",
831        "system/bt/vnd/ble",
832    ],
833    srcs: crypto_toolbox_srcs + [
834        "test/hci/stack_hci_test.cc",
835    ],
836    static_libs: [
837        "libbt-common",
838        "libbt-protos-lite",
839        "libbte",
840        "libgmock",
841        "liblog",
842        "libosi",
843        "libbtdevice",
844    ],
845    shared_libs: [
846        "libprotobuf-cpp-lite",
847        "libcrypto",
848    ],
849    sanitize: {
850        address: true,
851        all_undefined: true,
852        cfi: true,
853        integer_overflow: true,
854        scs: true,
855        diag: {
856            undefined : true
857        },
858    },
859}
860
861cc_test {
862    name: "net_test_stack_hid",
863    test_suites: ["device-tests"],
864    host_supported: true,
865    defaults: ["fluoride_defaults"],
866    local_include_dirs: [
867        "include",
868        "test/common",
869    ],
870    include_dirs: [
871        "system/bt",
872    ],
873    srcs: crypto_toolbox_srcs + [
874        ":TestStackL2cap",
875        ":TestStackSdp",
876        ":TestStackBtm",
877        ":TestStubLegacyTrace",
878        "hid/hidd_api.cc",
879        "hid/hidd_conn.cc",
880        "hid/hidh_api.cc",
881        "hid/hidh_conn.cc",
882        "test/hid/stack_hid_test.cc",
883    ],
884    static_libs: [
885        "libbt-common",
886        "libbt-protos-lite",
887        "libbtdevice",
888        "libbte",
889        "libgmock",
890        "liblog",
891        "libosi",
892    ],
893    shared_libs: [
894        "libcrypto",
895        "libprotobuf-cpp-lite",
896    ],
897    sanitize: {
898        address: true,
899        all_undefined: true,
900        cfi: true,
901        integer_overflow: true,
902        scs: true,
903        diag: {
904            undefined : true
905        },
906    },
907}
908
909cc_test {
910    name: "net_test_stack_btu",
911    test_suites: ["device-tests"],
912    host_supported: true,
913    defaults: ["fluoride_defaults"],
914    local_include_dirs: [
915        "include",
916        "test/common",
917    ],
918    include_dirs: [
919        "system/bt",
920        "system/bt/gd",
921    ],
922    generated_headers: [
923        "BluetoothGeneratedBundlerSchema_h_bfbs",
924        "BluetoothGeneratedDumpsysDataSchema_h",
925        "BluetoothGeneratedPackets_h",
926    ],
927    srcs: [
928        ":TestMockBta",
929        ":TestMockBtif",
930        ":TestMockHci",
931        ":TestMockLegacyHciCommands",
932        ":TestMockMainShim",
933        ":TestMockStackAcl",
934        ":TestMockStackSmp",
935        ":TestStackBtm",
936        ":TestStackL2cap",
937        ":TestMockStackMetrics",
938        "btu/btu_hcif.cc",
939        "btu/btu_task.cc",
940        "test/stack_btu_test.cc",
941    ],
942    static_libs: [
943        "libbt-common",
944        "libbt-protos-lite",
945        "libbtdevice",
946        "libgmock",
947        "liblog",
948        "libosi",
949    ],
950    shared_libs: [
951        "libbinder_ndk",
952        "libcrypto",
953        "libflatbuffers-cpp",
954        "libprotobuf-cpp-lite",
955    ],
956    sanitize: {
957        address: true,
958        all_undefined: true,
959        cfi: true,
960        integer_overflow: true,
961        scs: true,
962        diag: {
963            undefined : true
964        },
965    },
966}
967
968cc_test {
969    name: "net_test_stack_gatt",
970    test_suites: ["device-tests"],
971    host_supported: true,
972    defaults: ["fluoride_defaults"],
973    local_include_dirs: [
974        "include",
975        "test/common",
976    ],
977    include_dirs: [
978        "system/bt",
979        "system/bt/gd",
980        "system/bt/utils/include",
981    ],
982    generated_headers: [
983        "BluetoothGeneratedBundlerSchema_h_bfbs",
984        "BluetoothGeneratedDumpsysDataSchema_h",
985        "BluetoothGeneratedPackets_h",
986    ],
987    srcs: [
988        ":TestMockBta",
989        ":TestMockBtif",
990        ":TestMockHci",
991        ":TestMockLegacyHciCommands",
992        ":TestMockMainShim",
993        ":TestMockStackAcl",
994        ":TestMockStackCryptotoolbox",
995        ":TestMockStackSmp",
996        ":TestStackBtm",
997        ":TestStackL2cap",
998        ":TestStackSdp",
999        "eatt/eatt.cc",
1000        "gatt/att_protocol.cc",
1001        "gatt/connection_manager.cc",
1002        "gatt/gatt_api.cc",
1003        "gatt/gatt_attr.cc",
1004        "gatt/gatt_auth.cc",
1005        "gatt/gatt_cl.cc",
1006        "gatt/gatt_db.cc",
1007        "gatt/gatt_main.cc",
1008        "gatt/gatt_sr.cc",
1009        "gatt/gatt_sr_hash.cc",
1010        "gatt/gatt_utils.cc",
1011        "test/gatt/stack_gatt_test.cc",
1012    ],
1013    static_libs: [
1014        "libbt-common",
1015        "libbt-protos-lite",
1016        "libbtdevice",
1017        "libgmock",
1018        "liblog",
1019        "libosi",
1020    ],
1021    shared_libs: [
1022        "libbinder_ndk",
1023        "libcrypto",
1024        "libflatbuffers-cpp",
1025        "libprotobuf-cpp-lite",
1026    ],
1027    sanitize: {
1028        address: true,
1029        all_undefined: true,
1030        cfi: true,
1031        integer_overflow: true,
1032        scs: true,
1033        diag: {
1034            undefined : true
1035        },
1036    },
1037}
1038