blob: 3fd2fec95e64fc0d36136a6bc3a4edf271940c40 [file] [log] [blame]
Andre Eisenbach796523d2016-11-10 16:11:00 -08001cc_defaults {
2 name: "libbt-hci_defaults",
3 defaults: ["fluoride_defaults"],
4 shared_libs: [
5 "[email protected]",
Jakub Pawlowskide6c0132019-11-12 16:14:32 +01006 "[email protected]",
Andre Eisenbach796523d2016-11-10 16:11:00 -08007 "libhidlbase",
Andre Eisenbach796523d2016-11-10 16:11:00 -08008 ],
9}
10
Jack Hee2eeff42016-12-07 18:25:17 -080011// HCI static library for target
12// ========================================================
13cc_library_static {
14 name: "libbt-hci",
Andre Eisenbach796523d2016-11-10 16:11:00 -080015 defaults: ["libbt-hci_defaults"],
Jack Hee2eeff42016-12-07 18:25:17 -080016 srcs: [
17 "src/btsnoop.cc",
18 "src/btsnoop_mem.cc",
19 "src/btsnoop_net.cc",
20 "src/buffer_allocator.cc",
Jack Hee2eeff42016-12-07 18:25:17 -080021 "src/hci_inject.cc",
22 "src/hci_layer.cc",
Jakub Pawlowski32fbec62017-02-21 13:28:10 -080023 "src/hci_layer_android.cc",
Jack Hee2eeff42016-12-07 18:25:17 -080024 "src/hci_packet_factory.cc",
25 "src/hci_packet_parser.cc",
Jack Hee2eeff42016-12-07 18:25:17 -080026 "src/packet_fragmenter.cc",
Jack Hee2eeff42016-12-07 18:25:17 -080027 ],
28 local_include_dirs: [
29 "include",
30 ],
31 include_dirs: [
32 "system/bt",
Jakub Pawlowskiecace462017-10-17 16:40:41 -070033 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -080034 "system/bt/btcore/include",
35 "system/bt/stack/include",
36 "system/bt/utils/include",
37 "system/bt/bta/include",
Ugo Yu5cf94722019-11-26 17:18:32 +080038 "system/bt/btif/include",
Andre Eisenbach796523d2016-11-10 16:11:00 -080039 "system/libhwbinder/include",
Jack Hee2eeff42016-12-07 18:25:17 -080040 ],
41}
42
43// HCI unit tests for target
44// ========================================================
45cc_test {
46 name: "net_test_hci",
Dan Shi2705ebb2017-03-31 17:12:46 -070047 test_suites: ["device-tests"],
Andre Eisenbach796523d2016-11-10 16:11:00 -080048 defaults: ["libbt-hci_defaults"],
Jack Hee2eeff42016-12-07 18:25:17 -080049 local_include_dirs: [
50 "include",
51 ],
52 include_dirs: [
53 "system/bt",
Jakub Pawlowskiecace462017-10-17 16:40:41 -070054 "system/bt/internal_include",
Jack Hee2eeff42016-12-07 18:25:17 -080055 "system/bt/btcore/include",
56 "system/bt/osi/test",
57 "system/bt/stack/include",
58 "system/bt/utils/include",
Andre Eisenbach796523d2016-11-10 16:11:00 -080059 "system/libhwbinder/include",
Jack Hee2eeff42016-12-07 18:25:17 -080060 ],
61 srcs: [
Jack Hee2eeff42016-12-07 18:25:17 -080062 "test/packet_fragmenter_test.cc",
63 ],
64 shared_libs: [
65 "liblog",
66 "libdl",
67 "libprotobuf-cpp-lite",
68 ],
69 static_libs: [
70 "libbt-hci",
71 "libosi",
72 "libosi-AlarmTestHarness",
73 "libosi-AllocationTestHarness",
74 "libcutils",
75 "libbtcore",
Jack Head18de02018-03-03 00:03:25 -080076 "libbt-protos-lite",
Jack Hee2eeff42016-12-07 18:25:17 -080077 ],
78}
Chris Mantond3d77542020-03-03 10:33:42 -080079
80// HCI native unit tests for target
81// ========================================================
82cc_test {
83 name: "net_test_hci_native",
84 test_suites: ["device-tests"],
85 defaults: ["libbt-hci_defaults"],
86 host_supported: true,
87 local_include_dirs: [
88 "include",
89 ],
90 include_dirs: [
91 "system/bt",
92 "system/bt/stack/include",
93 ],
94 srcs: [
95 "test/hci_layer_test.cc",
96 "test/other_stack_stub.cc",
97 ],
98 shared_libs: [
99 "libcrypto",
100 "liblog",
101 "libprotobuf-cpp-lite",
102 ],
103 static_libs: [
104 "libbt-common",
105 "libbt-protos-lite",
106 "libosi",
107 "libosi-AllocationTestHarness",
108 ],
109 sanitize: {
110 address: true,
111 cfi: true,
112 misc_undefined: ["bounds"],
113 },
114}
Chris Manton94feacc2020-03-05 09:57:14 -0800115
116cc_test {
117 name: "net_test_hci_fragmenter_native",
118 test_suites: ["device-tests"],
119 defaults: ["fluoride_defaults"],
120 host_supported: true,
121 local_include_dirs: [
122 "include",
123 ],
124 include_dirs: [
125 "system/bt",
126 "system/bt/stack/include",
127 "system/bt/btcore/include",
128 "system/bt/osi/test",
129 ],
130 srcs: [
131 "src/buffer_allocator.cc",
132 "test/packet_fragmenter_host_test.cc",
133 ],
134 shared_libs: [
135 "libcrypto",
136 "liblog",
137 "libprotobuf-cpp-lite",
138 ],
139 static_libs: [
140 "libbt-common",
141 "libbt-protos-lite",
142 "libosi",
143 "libosi-AllocationTestHarness",
144 ],
145 sanitize: {
146 address: true,
147 cfi: true,
148 misc_undefined: ["bounds"],
149 },
150}
151