blob: 0f0d64aea85c39cd90639e7e5151d31920faeed1 [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 {
Hsin-Yi Chen69295752017-06-07 18:05:05 +080035 name: "binderDriverInterfaceTest_IPC_32",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070036 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -070037 srcs: ["binderDriverInterfaceTest.cpp"],
Yifan Hong4e419d82021-04-26 11:32:56 -070038 header_libs: ["libbinder_headers"],
Hsin-Yi Chen69295752017-06-07 18:05:05 +080039 compile_multilib: "32",
Steven Morelandea7659e2022-02-03 00:04:06 +000040 multilib: {
41 lib32: {
42 suffix: "",
43 },
44 },
Hsin-Yi Chen69295752017-06-07 18:05:05 +080045 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070046 test_suites: ["vts"],
Hsin-Yi Chen69295752017-06-07 18:05:05 +080047}
48
49cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070050 name: "binderDriverInterfaceTest",
51 defaults: ["binder_test_defaults"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070052 product_variables: {
53 binder32bit: {
54 cflags: ["-DBINDER_IPC_32BIT=1"],
55 },
56 },
Yifan Hong4e419d82021-04-26 11:32:56 -070057 header_libs: ["libbinder_headers"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070058 srcs: ["binderDriverInterfaceTest.cpp"],
Steven Morelandea7659e2022-02-03 00:04:06 +000059 test_suites: [
60 "device-tests",
61 "vts",
62 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070063}
64
65cc_test {
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080066 name: "binderLibTest_IPC_32",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070067 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -070068 srcs: ["binderLibTest.cpp"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080069 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -070070 "libbase",
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080071 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -070072 "liblog",
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080073 "libutils",
74 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -070075 static_libs: [
76 "libgmock",
77 ],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080078 compile_multilib: "32",
Steven Morelandea7659e2022-02-03 00:04:06 +000079 multilib: {
80 lib32: {
81 suffix: "",
82 },
83 },
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080084 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070085 test_suites: ["vts"],
86 require_root: true,
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080087}
88
Steven Morelandcefba612020-11-05 22:57:06 +000089// unit test only, which can run on host and doesn't use /dev/binder
90cc_test {
Steven Moreland28318602021-06-25 01:16:29 +000091 name: "binderUnitTest",
Steven Morelandcefba612020-11-05 22:57:06 +000092 host_supported: true,
93 target: {
94 darwin: {
95 enabled: false,
96 },
97 },
Steven Morelandea7659e2022-02-03 00:04:06 +000098 srcs: [
99 "binderParcelUnitTest.cpp",
100 "binderBinderUnitTest.cpp",
Steven Morelandcf373692022-01-21 23:55:15 +0000101 "binderStatusUnitTest.cpp",
Atneya Nair7ade4f42022-02-07 18:16:48 -0500102 "binderMemoryHeapBaseUnitTest.cpp",
Fabián Cañas08bdc772023-01-02 15:02:56 -0500103 "binderRecordedTransactionTest.cpp",
Steven Morelandea7659e2022-02-03 00:04:06 +0000104 ],
Steven Morelandcefba612020-11-05 22:57:06 +0000105 shared_libs: [
106 "libbinder",
Steven Morelandf80809b2021-10-07 18:09:20 -0700107 "libcutils",
Steven Morelandcefba612020-11-05 22:57:06 +0000108 "libutils",
109 ],
110 test_suites: ["general-tests"],
111}
112
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800113cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -0700114 name: "binderLibTest",
115 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800116 product_variables: {
117 binder32bit: {
118 cflags: ["-DBINDER_IPC_32BIT=1"],
119 },
120 },
121
Dan Willemsen59e086f2016-07-25 17:13:45 -0700122 srcs: ["binderLibTest.cpp"],
123 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -0700124 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700125 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -0700126 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700127 "libutils",
128 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700129 static_libs: [
130 "libgmock",
131 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000132 test_suites: [
133 "device-tests",
134 "vts",
135 ],
Dan Shi80ada592019-09-13 09:17:17 -0700136 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700137}
138
Steven Moreland37aff182021-03-26 02:04:16 +0000139aidl_interface {
140 name: "binderRpcTestIface",
141 host_supported: true,
142 unstable: true,
143 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700144 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000145 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700146 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000147 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000148 "IBinderRpcSession.aidl",
149 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700150 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000151 ],
152 backend: {
153 java: {
154 enabled: false,
155 },
156 },
157}
158
Yifan Honge0e53282021-09-23 18:37:21 -0700159cc_library_static {
160 name: "libbinder_tls_test_utils",
161 host_supported: true,
162 target: {
163 darwin: {
164 enabled: false,
165 },
166 },
167 defaults: [
168 "binder_test_defaults",
169 "libbinder_tls_shared_deps",
170 ],
171 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700172 "libbase",
173 "liblog",
174 ],
175 static_libs: [
176 "libbinder_tls_static",
177 ],
178 srcs: [
179 "RpcTlsTestUtils.cpp",
180 ],
181 export_include_dirs: [
182 "include_tls_test_utils",
183 ],
184 visibility: [
185 ":__subpackages__",
186 ],
187}
188
Andrei Homescu12106de2022-04-27 04:42:21 +0000189cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000190 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000191 host_supported: true,
192 target: {
193 darwin: {
194 enabled: false,
195 },
196 },
Steven Moreland37aff182021-03-26 02:04:16 +0000197 defaults: [
198 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000199 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000200
Andrei Homescu12106de2022-04-27 04:42:21 +0000201 static_libs: [
202 "libbinder_tls_static",
203 "libbinder_tls_test_utils",
204 "binderRpcTestIface-cpp",
205 "binderRpcTestIface-ndk",
206 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000207}
208
209cc_defaults {
210 name: "binderRpcTest_service_defaults",
211 defaults: [
212 "binderRpcTest_common_defaults",
213 ],
214 gtest: false,
215 auto_gen_config: false,
216 srcs: [
217 "binderRpcTestCommon.cpp",
218 "binderRpcTestService.cpp",
219 ],
220}
221
222cc_defaults {
223 name: "binderRpcTest_defaults",
224 target: {
225 android: {
226 test_suites: ["vts"],
227 },
228 },
229 defaults: [
230 "binderRpcTest_common_defaults",
231 ],
232
233 srcs: [
234 "binderRpcTest.cpp",
235 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000236 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000237 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000238
239 test_suites: ["general-tests"],
240 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000241
242 data_bins: [
243 "binder_rpc_test_service",
244 "binder_rpc_test_service_no_kernel",
245 "binder_rpc_test_service_single_threaded",
246 "binder_rpc_test_service_single_threaded_no_kernel",
247 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000248}
249
Andrei Homescu2a298012022-06-15 01:08:54 +0000250cc_defaults {
251 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000252 cflags: [
253 "-DBINDER_WITH_KERNEL_IPC",
254 ],
255
Steven Moreland5553ac42020-11-11 02:14:45 +0000256 shared_libs: [
257 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000258 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000259 "libbase",
260 "libutils",
261 "libcutils",
262 "liblog",
263 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000264}
265
266cc_defaults {
267 name: "binderRpcTest_static_defaults",
268
269 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000270 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000271 "libutils",
272 // libcrypto_static is not visible to this module
273 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000274 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000275 static_libs: [
276 "libbase",
277 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000278 "libssl",
279 ],
280
281 cflags: [
282 // Disable tests that require shared libraries,
283 // e.g., libbinder.so or libbinder_ndk.so
284 "-DBINDER_TEST_NO_SHARED_LIBS",
285 ],
286}
287
288cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000289 // The module name cannot start with "binderRpcTest" because
290 // then atest tries to execute it as part of binderRpcTest
291 name: "binder_rpc_test_service",
292 defaults: [
293 "binderRpcTest_service_defaults",
294 "binderRpcTest_shared_defaults",
295 "libbinder_tls_shared_deps",
296 ],
297}
298
299cc_test {
300 name: "binder_rpc_test_service_no_kernel",
301 defaults: [
302 "binderRpcTest_service_defaults",
303 "binderRpcTest_static_defaults",
304 ],
305 static_libs: [
306 "libbinder_rpc_no_kernel",
307 ],
308}
309
310cc_test {
311 name: "binder_rpc_test_service_single_threaded",
312 defaults: [
313 "binderRpcTest_service_defaults",
314 "binderRpcTest_static_defaults",
315 ],
316 cflags: [
317 "-DBINDER_RPC_SINGLE_THREADED",
318 "-DBINDER_WITH_KERNEL_IPC",
319 ],
320 static_libs: [
321 "libbinder_rpc_single_threaded",
322 ],
323}
324
325cc_test {
326 name: "binder_rpc_test_service_single_threaded_no_kernel",
327 defaults: [
328 "binderRpcTest_service_defaults",
329 "binderRpcTest_static_defaults",
330 ],
331 cflags: [
332 "-DBINDER_RPC_SINGLE_THREADED",
333 ],
334 static_libs: [
335 "libbinder_rpc_single_threaded_no_kernel",
336 ],
337}
338
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000339cc_binary {
340 name: "binderRpcTestService_on_trusty_mock",
341 defaults: [
342 "trusty_mock_defaults",
343 ],
344
345 srcs: [
346 "binderRpcTestCommon.cpp",
347 "binderRpcTestServiceTrusty.cpp",
348 ],
349
350 shared_libs: [
351 "libbinder_on_trusty_mock",
352 "libbase",
353 "libutils",
354 "libcutils",
355 ],
356
357 static_libs: [
358 "binderRpcTestIface-cpp",
359 ],
360}
361
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000362cc_binary {
363 name: "binderRpcTest_on_trusty_mock",
364 defaults: [
365 "trusty_mock_defaults",
366 ],
367
368 srcs: [
369 "binderRpcUniversalTests.cpp",
370 "binderRpcTestCommon.cpp",
371 "binderRpcTestTrusty.cpp",
372 ],
373
374 shared_libs: [
375 "libbinder_on_trusty_mock",
376 "libbase",
377 "libutils",
378 "libcutils",
379 ],
380
381 static_libs: [
382 "binderRpcTestIface-cpp",
383 "libgtest",
384 ],
385}
386
Andrei Homescu2a298012022-06-15 01:08:54 +0000387cc_test {
388 name: "binderRpcTest",
389 defaults: [
390 "binderRpcTest_defaults",
391 "binderRpcTest_shared_defaults",
392 "libbinder_tls_shared_deps",
393 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000394
395 // Add the Trusty mock library as a fake dependency so it gets built
396 required: [
397 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000398 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000399 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000400 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000401}
402
403cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000404 name: "binderRpcTestNoKernel",
405 defaults: [
406 "binderRpcTest_defaults",
407 "binderRpcTest_static_defaults",
408 ],
409 static_libs: [
410 "libbinder_rpc_no_kernel",
411 ],
412}
413
414cc_test {
415 name: "binderRpcTestSingleThreaded",
416 defaults: [
417 "binderRpcTest_defaults",
418 "binderRpcTest_static_defaults",
419 ],
420 cflags: [
421 "-DBINDER_RPC_SINGLE_THREADED",
422 "-DBINDER_WITH_KERNEL_IPC",
423 ],
424 static_libs: [
425 "libbinder_rpc_single_threaded",
426 ],
427}
428
429cc_test {
430 name: "binderRpcTestSingleThreadedNoKernel",
431 defaults: [
432 "binderRpcTest_defaults",
433 "binderRpcTest_static_defaults",
434 ],
435 cflags: [
436 "-DBINDER_RPC_SINGLE_THREADED",
437 ],
438 static_libs: [
439 "libbinder_rpc_single_threaded_no_kernel",
440 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000441}
442
Yifan Hongff73aa92021-09-17 21:28:01 -0700443cc_test {
444 name: "RpcTlsUtilsTest",
445 host_supported: true,
446 target: {
447 darwin: {
448 enabled: false,
449 },
450 android: {
451 test_suites: ["vts"],
452 },
453 },
454 defaults: [
455 "binder_test_defaults",
456 "libbinder_tls_shared_deps",
457 ],
458 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700459 "RpcTlsUtilsTest.cpp",
460 ],
461 shared_libs: [
462 "libbinder",
463 "libbase",
464 "libutils",
465 "liblog",
466 ],
467 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700468 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700469 "libbinder_tls_static",
470 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000471 test_suites: [
472 "general-tests",
473 "device-tests",
474 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700475}
476
Steven Morelandcda60852021-04-14 23:45:32 +0000477cc_benchmark {
478 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700479 defaults: [
480 "binder_test_defaults",
481 "libbinder_tls_shared_deps",
482 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000483 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000484 target: {
485 darwin: {
486 enabled: false,
487 },
488 },
Steven Morelandcda60852021-04-14 23:45:32 +0000489 srcs: [
490 "binderRpcBenchmark.cpp",
491 "IBinderRpcBenchmark.aidl",
492 ],
493 shared_libs: [
494 "libbase",
495 "libbinder",
496 "liblog",
497 "libutils",
498 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700499 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700500 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700501 "libbinder_tls_static",
502 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000503}
504
Steven Moreland5553ac42020-11-11 02:14:45 +0000505cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700506 name: "binderRpcWireProtocolTest",
507 host_supported: true,
508 target: {
509 darwin: {
510 enabled: false,
511 },
512 android: {
513 test_suites: ["vts"],
514 },
515 },
516 defaults: [
517 "binder_test_defaults",
518 ],
519 srcs: [
520 "binderRpcWireProtocolTest.cpp",
521 ],
522 shared_libs: [
523 "libbinder",
524 "libbase",
525 "libutils",
526 "libcutils",
527 "liblog",
528 ],
529 test_suites: ["general-tests"],
530}
531
532cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700533 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700534 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700535 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700536 shared_libs: [
537 "libbinder",
538 "libutils",
539 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700540 cflags: [
541 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700542 "-Wno-missing-field-initializers",
543 "-Wno-sign-compare",
544 "-O3",
545 ],
546}
Wei Wang78f2a372016-10-20 23:18:17 -0700547
548cc_test {
549 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700550 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700551 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700552 shared_libs: [
553 "libbinder",
554 "libutils",
555 "libbase",
556 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700557 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700558}
Howard Chenc135dbc2017-03-25 17:12:59 +0800559
560cc_test {
561 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700562 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700563 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800564 shared_libs: [
565 "libbinder",
566 "libutils",
567 "libbase",
568 ],
569}
Dan Stozad630e522016-12-01 15:16:31 -0800570
571cc_test {
572 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700573 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700574 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800575
576 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800577 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800578 ],
579
580 cpp_std: "experimental",
581 gnu_extensions: false,
582
583 shared_libs: [
584 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700585 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800586 "liblog",
587 "libutils",
588 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000589 test_suites: [
590 "device-tests",
591 "vts",
592 ],
Dan Shi80ada592019-09-13 09:17:17 -0700593 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800594}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700595
Steven Morelandf23dae22020-10-27 19:34:55 +0000596cc_test {
597 name: "binderClearBufTest",
598 defaults: ["binder_test_defaults"],
599 srcs: [
600 "binderClearBufTest.cpp",
601 ],
602
603 shared_libs: [
604 "libbase",
605 "libbinder",
606 "liblog",
607 "libutils",
608 ],
609
610 test_suites: ["general-tests"],
611 require_root: true,
612}
613
Steven Moreland12300a02019-08-02 13:27:15 -0700614aidl_interface {
615 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900616 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700617 srcs: [
618 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700619 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000620 backend: {
621 java: {
622 enabled: false,
623 },
624 },
Steven Moreland12300a02019-08-02 13:27:15 -0700625}
626
Steven Morelanddea3cf92019-07-16 18:06:55 -0700627cc_test {
628 name: "binderStabilityTest",
629 defaults: ["binder_test_defaults"],
630 srcs: [
631 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700632 ],
633
Steven Moreland13f84662020-07-23 21:30:41 +0000634 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700635 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700636 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700637 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700638 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700639 "libutils",
640 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700641 static_libs: [
642 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900643 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700644 ],
645
Steven Morelandea7659e2022-02-03 00:04:06 +0000646 test_suites: [
647 "device-tests",
648 "vts",
649 ],
Dan Shi302709b2019-09-19 15:28:15 -0700650 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700651}
Steven Moreland042ae822020-05-27 17:45:17 +0000652
653cc_test {
654 name: "binderAllocationLimits",
655 defaults: ["binder_test_defaults"],
656 srcs: ["binderAllocationLimits.cpp"],
657 shared_libs: [
658 "libbinder",
659 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000660 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000661 "libutils",
662 "libutilscallstack",
663 "libbase",
664 ],
665 test_suites: ["device-tests"],
666 require_root: true,
667}
Andy Hung73a14702020-11-24 13:04:46 -0800668
669cc_benchmark {
670 name: "binderParcelBenchmark",
671 defaults: ["binder_test_defaults"],
672 srcs: ["binderParcelBenchmark.cpp"],
673 shared_libs: [
674 "libbase",
675 "libbinder",
676 "liblog",
677 "libutils",
678 ],
679}
Yifan Hongaf766e62021-06-14 13:24:19 -0700680
681cc_test_host {
682 name: "binderUtilsHostTest",
683 defaults: ["binder_test_defaults"],
684 srcs: ["binderUtilsHostTest.cpp"],
685 shared_libs: [
686 "libbase",
687 "libbinder",
688 ],
689 static_libs: [
690 "libgmock",
691 ],
692 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700693 target: {
694 darwin: {
695 enabled: false,
696 },
697 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700698}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700699
700cc_test_host {
701 name: "binderHostDeviceTest",
702 defaults: ["binder_test_defaults"],
703 srcs: ["binderHostDeviceTest.cpp"],
704 test_config: "binderHostDeviceTest.xml",
705 shared_libs: [
706 "libbase",
707 "libbinder",
708 "liblog",
709 "libutils",
710 ],
711 static_libs: [
712 "libgmock",
713 ],
714 target_required: [
715 "binderHostDeviceTestService",
716 ],
717 test_suites: ["general-tests"],
718 target: {
719 darwin: {
720 enabled: false,
721 },
722 },
723 test_options: {
724 unit_test: false,
725 },
726}
727
728cc_test {
729 name: "binderHostDeviceTestService",
730 // The binary is named differently from the module so that PushFilePreparer pushes the binary
731 // directly, not the test module directory.
732 stem: "binderHostDeviceTest-service",
733 defaults: ["binder_test_defaults"],
734 gtest: false,
735 auto_gen_config: false,
736 srcs: ["binderHostDeviceTestService.cpp"],
737 shared_libs: [
738 "libbase",
739 "libbinder",
740 "liblog",
741 "libutils",
742 ],
743 test_suites: ["general-tests"],
744}
Pawanf00fabb2022-08-04 17:56:18 +0000745
746cc_defaults {
747 name: "service_fuzzer_defaults",
748 static_libs: [
749 "libbase",
750 "libbinder_random_parcel",
751 "libcutils",
752 ],
753 target: {
754 android: {
755 shared_libs: [
756 "libbinder_ndk",
757 "libbinder",
758 "libutils",
759 ],
760 },
761 host: {
762 static_libs: [
763 "libbinder_ndk",
764 "libbinder",
765 "libutils",
766 ],
767 },
768 darwin: {
769 enabled: false,
770 },
771 },
772 fuzz_config: {
773 cc: [
774 "smoreland@google.com",
775 "waghpawan@google.com",
776 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000777 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
778 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000779 },
780}