blob: 24fd2a6048d4fecbc4eb8c8a1d05e6d3f1c0a3ac [file] [log] [blame]
Dan Willemsen59e086f2016-07-25 17:13:45 -07001//
2// Copyright (C) 2014 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
Bob Badour3c538232021-02-12 21:26:48 -080017package {
18 // See: http://go/android-license-faq
19 // A large-scale-change added 'default_applicable_licenses' to import
20 // all of the 'license_kinds' from "frameworks_native_license"
21 // to get the below license kinds:
22 // SPDX-license-identifier-Apache-2.0
23 default_applicable_licenses: ["frameworks_native_license"],
24}
25
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070026cc_defaults {
27 name: "binder_test_defaults",
28 cflags: [
29 "-Wall",
30 "-Werror",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070031 ],
32}
33
Dan Willemsen59e086f2016-07-25 17:13:45 -070034cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070035 name: "binderDriverInterfaceTest",
36 defaults: ["binder_test_defaults"],
Yifan Hong4e419d82021-04-26 11:32:56 -070037 header_libs: ["libbinder_headers"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070038 srcs: ["binderDriverInterfaceTest.cpp"],
Steven Morelandea7659e2022-02-03 00:04:06 +000039 test_suites: [
40 "device-tests",
41 "vts",
42 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070043}
44
Steven Morelandcefba612020-11-05 22:57:06 +000045// unit test only, which can run on host and doesn't use /dev/binder
46cc_test {
Steven Moreland28318602021-06-25 01:16:29 +000047 name: "binderUnitTest",
Steven Morelandcefba612020-11-05 22:57:06 +000048 host_supported: true,
49 target: {
50 darwin: {
51 enabled: false,
52 },
53 },
Steven Morelandea7659e2022-02-03 00:04:06 +000054 srcs: [
55 "binderParcelUnitTest.cpp",
56 "binderBinderUnitTest.cpp",
Steven Morelandcf373692022-01-21 23:55:15 +000057 "binderStatusUnitTest.cpp",
Atneya Nair7ade4f42022-02-07 18:16:48 -050058 "binderMemoryHeapBaseUnitTest.cpp",
Fabián Cañas08bdc772023-01-02 15:02:56 -050059 "binderRecordedTransactionTest.cpp",
Steven Morelandea7659e2022-02-03 00:04:06 +000060 ],
Steven Morelandcefba612020-11-05 22:57:06 +000061 shared_libs: [
62 "libbinder",
Steven Morelandf80809b2021-10-07 18:09:20 -070063 "libcutils",
Steven Morelandcefba612020-11-05 22:57:06 +000064 "libutils",
65 ],
66 test_suites: ["general-tests"],
67}
68
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080069cc_test {
Steven Morelanda8244b92023-04-20 23:34:11 +000070 name: "binderRecordReplayTest",
71 srcs: ["binderRecordReplayTest.cpp"],
72 shared_libs: [
73 "libbinder",
74 "libcutils",
75 "libutils",
76 ],
77 static_libs: [
78 "binderRecordReplayTestIface-cpp",
Pawan Wagh8da45382023-05-11 08:08:50 +000079 "binderReadParcelIface-cpp",
Steven Morelanda8244b92023-04-20 23:34:11 +000080 ],
81 test_suites: ["general-tests"],
Steven Moreland4ed688d2023-05-03 23:03:56 +000082 require_root: true,
Steven Morelanda8244b92023-04-20 23:34:11 +000083}
84
85aidl_interface {
86 name: "binderRecordReplayTestIface",
87 unstable: true,
88 srcs: [
89 "IBinderRecordReplayTest.aidl",
90 ],
Pawan Wagh8da45382023-05-11 08:08:50 +000091 imports: ["binderReadParcelIface"],
92 backend: {
93 java: {
94 enabled: true,
95 platform_apis: true,
96 },
97 },
Steven Morelanda8244b92023-04-20 23:34:11 +000098}
99
100cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -0700101 name: "binderLibTest",
102 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800103
Dan Willemsen59e086f2016-07-25 17:13:45 -0700104 srcs: ["binderLibTest.cpp"],
105 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -0700106 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700107 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -0700108 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700109 "libutils",
110 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700111 static_libs: [
112 "libgmock",
113 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000114 test_suites: [
115 "device-tests",
116 "vts",
117 ],
Dan Shi80ada592019-09-13 09:17:17 -0700118 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700119}
120
Steven Moreland37aff182021-03-26 02:04:16 +0000121aidl_interface {
122 name: "binderRpcTestIface",
Andrei Homescud65666d2023-03-03 07:28:02 +0000123 vendor_available: true,
Steven Moreland37aff182021-03-26 02:04:16 +0000124 host_supported: true,
125 unstable: true,
126 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700127 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000128 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700129 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000130 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000131 "IBinderRpcSession.aidl",
132 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700133 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000134 ],
135 backend: {
136 java: {
137 enabled: false,
138 },
139 },
140}
141
Yifan Honge0e53282021-09-23 18:37:21 -0700142cc_library_static {
143 name: "libbinder_tls_test_utils",
144 host_supported: true,
Andrei Homescud65666d2023-03-03 07:28:02 +0000145 vendor_available: true,
Yifan Honge0e53282021-09-23 18:37:21 -0700146 target: {
147 darwin: {
148 enabled: false,
149 },
150 },
151 defaults: [
152 "binder_test_defaults",
153 "libbinder_tls_shared_deps",
154 ],
155 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700156 "libbase",
157 "liblog",
158 ],
159 static_libs: [
160 "libbinder_tls_static",
161 ],
162 srcs: [
163 "RpcTlsTestUtils.cpp",
164 ],
165 export_include_dirs: [
166 "include_tls_test_utils",
167 ],
168 visibility: [
169 ":__subpackages__",
170 ],
171}
172
Andrei Homescu12106de2022-04-27 04:42:21 +0000173cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000174 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000175 host_supported: true,
176 target: {
177 darwin: {
178 enabled: false,
179 },
180 },
Steven Moreland37aff182021-03-26 02:04:16 +0000181 defaults: [
182 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000183 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000184
Andrei Homescu12106de2022-04-27 04:42:21 +0000185 static_libs: [
186 "libbinder_tls_static",
187 "libbinder_tls_test_utils",
188 "binderRpcTestIface-cpp",
189 "binderRpcTestIface-ndk",
190 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000191}
192
193cc_defaults {
194 name: "binderRpcTest_service_defaults",
195 defaults: [
196 "binderRpcTest_common_defaults",
197 ],
198 gtest: false,
199 auto_gen_config: false,
200 srcs: [
201 "binderRpcTestCommon.cpp",
202 "binderRpcTestService.cpp",
203 ],
204}
205
206cc_defaults {
207 name: "binderRpcTest_defaults",
208 target: {
209 android: {
210 test_suites: ["vts"],
211 },
212 },
213 defaults: [
214 "binderRpcTest_common_defaults",
215 ],
216
217 srcs: [
218 "binderRpcTest.cpp",
219 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000220 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000221 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000222
Steven Moreland20531612023-04-04 18:03:24 +0000223 // This test uses a lot of resources and takes a long time. Due to
224 // design of several tests, it is also very sensitive to resource
225 // contention on the device. b/276820894
226 test_options: {
227 unit_test: false,
228 },
229
Andrei Homescu12106de2022-04-27 04:42:21 +0000230 test_suites: ["general-tests"],
231 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000232
233 data_bins: [
234 "binder_rpc_test_service",
235 "binder_rpc_test_service_no_kernel",
236 "binder_rpc_test_service_single_threaded",
237 "binder_rpc_test_service_single_threaded_no_kernel",
238 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000239}
240
Andrei Homescu2a298012022-06-15 01:08:54 +0000241cc_defaults {
242 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000243 cflags: [
244 "-DBINDER_WITH_KERNEL_IPC",
245 ],
246
Steven Moreland5553ac42020-11-11 02:14:45 +0000247 shared_libs: [
248 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000249 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000250 "libbase",
251 "libutils",
252 "libcutils",
253 "liblog",
254 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000255}
256
257cc_defaults {
258 name: "binderRpcTest_static_defaults",
259
260 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000261 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000262 "libutils",
263 // libcrypto_static is not visible to this module
264 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000265 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000266 static_libs: [
267 "libbase",
268 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000269 "libssl",
270 ],
271
272 cflags: [
273 // Disable tests that require shared libraries,
274 // e.g., libbinder.so or libbinder_ndk.so
275 "-DBINDER_TEST_NO_SHARED_LIBS",
276 ],
277}
278
279cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000280 // The module name cannot start with "binderRpcTest" because
281 // then atest tries to execute it as part of binderRpcTest
282 name: "binder_rpc_test_service",
283 defaults: [
284 "binderRpcTest_service_defaults",
285 "binderRpcTest_shared_defaults",
286 "libbinder_tls_shared_deps",
287 ],
288}
289
290cc_test {
291 name: "binder_rpc_test_service_no_kernel",
292 defaults: [
293 "binderRpcTest_service_defaults",
294 "binderRpcTest_static_defaults",
295 ],
296 static_libs: [
297 "libbinder_rpc_no_kernel",
298 ],
299}
300
301cc_test {
302 name: "binder_rpc_test_service_single_threaded",
303 defaults: [
304 "binderRpcTest_service_defaults",
305 "binderRpcTest_static_defaults",
306 ],
307 cflags: [
308 "-DBINDER_RPC_SINGLE_THREADED",
309 "-DBINDER_WITH_KERNEL_IPC",
310 ],
311 static_libs: [
312 "libbinder_rpc_single_threaded",
313 ],
314}
315
316cc_test {
317 name: "binder_rpc_test_service_single_threaded_no_kernel",
318 defaults: [
319 "binderRpcTest_service_defaults",
320 "binderRpcTest_static_defaults",
321 ],
322 cflags: [
323 "-DBINDER_RPC_SINGLE_THREADED",
324 ],
325 static_libs: [
326 "libbinder_rpc_single_threaded_no_kernel",
327 ],
328}
329
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000330cc_binary {
331 name: "binderRpcTestService_on_trusty_mock",
332 defaults: [
333 "trusty_mock_defaults",
334 ],
335
336 srcs: [
337 "binderRpcTestCommon.cpp",
338 "binderRpcTestServiceTrusty.cpp",
339 ],
340
341 shared_libs: [
342 "libbinder_on_trusty_mock",
343 "libbase",
344 "libutils",
345 "libcutils",
346 ],
347
348 static_libs: [
349 "binderRpcTestIface-cpp",
350 ],
351}
352
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000353cc_binary {
354 name: "binderRpcTest_on_trusty_mock",
355 defaults: [
356 "trusty_mock_defaults",
357 ],
358
359 srcs: [
360 "binderRpcUniversalTests.cpp",
361 "binderRpcTestCommon.cpp",
362 "binderRpcTestTrusty.cpp",
363 ],
364
365 shared_libs: [
366 "libbinder_on_trusty_mock",
367 "libbase",
368 "libutils",
369 "libcutils",
370 ],
371
372 static_libs: [
373 "binderRpcTestIface-cpp",
374 "libgtest",
375 ],
376}
377
Andrei Homescu2a298012022-06-15 01:08:54 +0000378cc_test {
379 name: "binderRpcTest",
380 defaults: [
381 "binderRpcTest_defaults",
382 "binderRpcTest_shared_defaults",
383 "libbinder_tls_shared_deps",
384 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000385
386 // Add the Trusty mock library as a fake dependency so it gets built
387 required: [
388 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000389 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000390 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000391 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000392}
393
394cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000395 name: "binderRpcTestNoKernel",
396 defaults: [
397 "binderRpcTest_defaults",
398 "binderRpcTest_static_defaults",
399 ],
400 static_libs: [
401 "libbinder_rpc_no_kernel",
402 ],
403}
404
405cc_test {
406 name: "binderRpcTestSingleThreaded",
407 defaults: [
408 "binderRpcTest_defaults",
409 "binderRpcTest_static_defaults",
410 ],
411 cflags: [
412 "-DBINDER_RPC_SINGLE_THREADED",
413 "-DBINDER_WITH_KERNEL_IPC",
414 ],
415 static_libs: [
416 "libbinder_rpc_single_threaded",
417 ],
418}
419
420cc_test {
421 name: "binderRpcTestSingleThreadedNoKernel",
422 defaults: [
423 "binderRpcTest_defaults",
424 "binderRpcTest_static_defaults",
425 ],
426 cflags: [
427 "-DBINDER_RPC_SINGLE_THREADED",
428 ],
429 static_libs: [
430 "libbinder_rpc_single_threaded_no_kernel",
431 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000432}
433
Yifan Hongff73aa92021-09-17 21:28:01 -0700434cc_test {
Andrei Homescud65666d2023-03-03 07:28:02 +0000435 name: "binderRpcToTrustyTest",
436 vendor: true,
437 host_supported: false,
438 defaults: [
439 "binderRpcTest_common_defaults",
440 "binderRpcTest_static_defaults",
441 ],
442
443 srcs: [
444 "binderRpcTest.cpp",
445 "binderRpcTestCommon.cpp",
446 "binderRpcUniversalTests.cpp",
447 ],
448
449 cflags: [
450 "-DBINDER_RPC_TO_TRUSTY_TEST",
451 ],
452
453 static_libs: [
454 // We want to link libbinder statically so we can push the binary
455 // to the device for testing independently of the library
456 "libbinder_rpc_no_kernel",
457 "libbinder_trusty",
458 "libtrusty",
459 ],
460
461 test_suites: ["device-tests"],
462 require_root: true,
463}
464
465cc_test {
Yifan Hongff73aa92021-09-17 21:28:01 -0700466 name: "RpcTlsUtilsTest",
467 host_supported: true,
468 target: {
469 darwin: {
470 enabled: false,
471 },
472 android: {
473 test_suites: ["vts"],
474 },
475 },
476 defaults: [
477 "binder_test_defaults",
478 "libbinder_tls_shared_deps",
479 ],
480 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700481 "RpcTlsUtilsTest.cpp",
482 ],
483 shared_libs: [
484 "libbinder",
485 "libbase",
486 "libutils",
487 "liblog",
488 ],
489 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700490 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700491 "libbinder_tls_static",
492 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000493 test_suites: [
494 "general-tests",
495 "device-tests",
496 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700497}
498
Steven Morelandcda60852021-04-14 23:45:32 +0000499cc_benchmark {
500 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700501 defaults: [
502 "binder_test_defaults",
503 "libbinder_tls_shared_deps",
504 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000505 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000506 target: {
507 darwin: {
508 enabled: false,
509 },
510 },
Steven Morelandcda60852021-04-14 23:45:32 +0000511 srcs: [
512 "binderRpcBenchmark.cpp",
513 "IBinderRpcBenchmark.aidl",
514 ],
515 shared_libs: [
516 "libbase",
517 "libbinder",
518 "liblog",
519 "libutils",
520 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700521 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700522 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700523 "libbinder_tls_static",
524 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000525}
526
Steven Moreland5553ac42020-11-11 02:14:45 +0000527cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700528 name: "binderRpcWireProtocolTest",
529 host_supported: true,
530 target: {
531 darwin: {
532 enabled: false,
533 },
534 android: {
535 test_suites: ["vts"],
536 },
537 },
538 defaults: [
539 "binder_test_defaults",
540 ],
541 srcs: [
542 "binderRpcWireProtocolTest.cpp",
543 ],
544 shared_libs: [
545 "libbinder",
546 "libbase",
547 "libutils",
548 "libcutils",
549 "liblog",
550 ],
551 test_suites: ["general-tests"],
552}
553
554cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700555 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700556 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700557 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700558 shared_libs: [
559 "libbinder",
560 "libutils",
561 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700562 cflags: [
563 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700564 "-Wno-missing-field-initializers",
565 "-Wno-sign-compare",
566 "-O3",
567 ],
568}
Wei Wang78f2a372016-10-20 23:18:17 -0700569
570cc_test {
571 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700572 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700573 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700574 shared_libs: [
575 "libbinder",
576 "libutils",
577 "libbase",
578 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700579 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700580}
Howard Chenc135dbc2017-03-25 17:12:59 +0800581
582cc_test {
583 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700584 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700585 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800586 shared_libs: [
587 "libbinder",
588 "libutils",
589 "libbase",
590 ],
591}
Dan Stozad630e522016-12-01 15:16:31 -0800592
593cc_test {
594 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700595 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700596 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800597
598 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800599 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800600 ],
601
602 cpp_std: "experimental",
603 gnu_extensions: false,
604
605 shared_libs: [
606 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700607 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800608 "liblog",
609 "libutils",
610 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000611 test_suites: [
612 "device-tests",
613 "vts",
614 ],
Dan Shi80ada592019-09-13 09:17:17 -0700615 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800616}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700617
Steven Morelandf23dae22020-10-27 19:34:55 +0000618cc_test {
619 name: "binderClearBufTest",
620 defaults: ["binder_test_defaults"],
621 srcs: [
622 "binderClearBufTest.cpp",
623 ],
624
625 shared_libs: [
626 "libbase",
627 "libbinder",
628 "liblog",
629 "libutils",
630 ],
631
632 test_suites: ["general-tests"],
633 require_root: true,
634}
635
Steven Moreland12300a02019-08-02 13:27:15 -0700636aidl_interface {
637 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900638 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700639 srcs: [
640 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700641 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000642 backend: {
643 java: {
644 enabled: false,
645 },
646 },
Steven Moreland12300a02019-08-02 13:27:15 -0700647}
648
Steven Morelanddea3cf92019-07-16 18:06:55 -0700649cc_test {
650 name: "binderStabilityTest",
651 defaults: ["binder_test_defaults"],
652 srcs: [
653 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700654 ],
655
Steven Moreland13f84662020-07-23 21:30:41 +0000656 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700657 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700658 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700659 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700660 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700661 "libutils",
662 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700663 static_libs: [
664 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900665 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700666 ],
667
Steven Morelandea7659e2022-02-03 00:04:06 +0000668 test_suites: [
669 "device-tests",
670 "vts",
671 ],
Dan Shi302709b2019-09-19 15:28:15 -0700672 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700673}
Steven Moreland042ae822020-05-27 17:45:17 +0000674
675cc_test {
676 name: "binderAllocationLimits",
677 defaults: ["binder_test_defaults"],
678 srcs: ["binderAllocationLimits.cpp"],
679 shared_libs: [
680 "libbinder",
681 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000682 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000683 "libutils",
684 "libutilscallstack",
685 "libbase",
686 ],
687 test_suites: ["device-tests"],
688 require_root: true,
689}
Andy Hung73a14702020-11-24 13:04:46 -0800690
691cc_benchmark {
692 name: "binderParcelBenchmark",
693 defaults: ["binder_test_defaults"],
694 srcs: ["binderParcelBenchmark.cpp"],
695 shared_libs: [
696 "libbase",
697 "libbinder",
698 "liblog",
699 "libutils",
700 ],
Steven Moreland9b254dd2023-05-11 00:37:55 +0000701 test_suites: ["general-tests"],
Andy Hung73a14702020-11-24 13:04:46 -0800702}
Yifan Hongaf766e62021-06-14 13:24:19 -0700703
704cc_test_host {
705 name: "binderUtilsHostTest",
706 defaults: ["binder_test_defaults"],
707 srcs: ["binderUtilsHostTest.cpp"],
708 shared_libs: [
709 "libbase",
710 "libbinder",
711 ],
712 static_libs: [
713 "libgmock",
714 ],
715 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700716 target: {
717 darwin: {
718 enabled: false,
719 },
720 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700721}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700722
723cc_test_host {
724 name: "binderHostDeviceTest",
725 defaults: ["binder_test_defaults"],
726 srcs: ["binderHostDeviceTest.cpp"],
727 test_config: "binderHostDeviceTest.xml",
728 shared_libs: [
729 "libbase",
730 "libbinder",
731 "liblog",
732 "libutils",
733 ],
734 static_libs: [
735 "libgmock",
736 ],
737 target_required: [
738 "binderHostDeviceTestService",
739 ],
740 test_suites: ["general-tests"],
741 target: {
742 darwin: {
743 enabled: false,
744 },
745 },
746 test_options: {
747 unit_test: false,
748 },
749}
750
751cc_test {
752 name: "binderHostDeviceTestService",
753 // The binary is named differently from the module so that PushFilePreparer pushes the binary
754 // directly, not the test module directory.
755 stem: "binderHostDeviceTest-service",
756 defaults: ["binder_test_defaults"],
757 gtest: false,
758 auto_gen_config: false,
759 srcs: ["binderHostDeviceTestService.cpp"],
760 shared_libs: [
761 "libbase",
762 "libbinder",
763 "liblog",
764 "libutils",
765 ],
766 test_suites: ["general-tests"],
767}
Pawanf00fabb2022-08-04 17:56:18 +0000768
769cc_defaults {
770 name: "service_fuzzer_defaults",
771 static_libs: [
772 "libbase",
773 "libbinder_random_parcel",
774 "libcutils",
775 ],
776 target: {
777 android: {
778 shared_libs: [
779 "libbinder_ndk",
780 "libbinder",
781 "libutils",
782 ],
783 },
784 host: {
785 static_libs: [
786 "libbinder_ndk",
787 "libbinder",
788 "libutils",
789 ],
790 },
791 darwin: {
792 enabled: false,
793 },
794 },
795 fuzz_config: {
796 cc: [
797 "smoreland@google.com",
798 "waghpawan@google.com",
799 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000800 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
801 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000802 },
803}
Pawan Wagh475f66c2023-05-05 21:46:07 +0000804
805cc_defaults {
806 name: "fuzzer_disable_leaks",
Pawan Wagh6b70c612023-06-06 20:58:50 +0000807 //TODO(b/286112918) : Readd leak detection options
Pawan Wagh475f66c2023-05-05 21:46:07 +0000808}