blob: bab4e73a4ccd229226f4d017d1e9e88cc21bb669 [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: [
270 "libutils",
271 // libcrypto_static is not visible to this module
272 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000273 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000274 static_libs: [
275 "libbase",
276 "libcutils",
277 "liblog",
278 "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 Homescu2a298012022-06-15 01:08:54 +0000362cc_test {
363 name: "binderRpcTest",
364 defaults: [
365 "binderRpcTest_defaults",
366 "binderRpcTest_shared_defaults",
367 "libbinder_tls_shared_deps",
368 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000369
370 // Add the Trusty mock library as a fake dependency so it gets built
371 required: [
372 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000373 "binderRpcTestService_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000374 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000375}
376
377cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000378 name: "binderRpcTestNoKernel",
379 defaults: [
380 "binderRpcTest_defaults",
381 "binderRpcTest_static_defaults",
382 ],
383 static_libs: [
384 "libbinder_rpc_no_kernel",
385 ],
386}
387
388cc_test {
389 name: "binderRpcTestSingleThreaded",
390 defaults: [
391 "binderRpcTest_defaults",
392 "binderRpcTest_static_defaults",
393 ],
394 cflags: [
395 "-DBINDER_RPC_SINGLE_THREADED",
396 "-DBINDER_WITH_KERNEL_IPC",
397 ],
398 static_libs: [
399 "libbinder_rpc_single_threaded",
400 ],
401}
402
403cc_test {
404 name: "binderRpcTestSingleThreadedNoKernel",
405 defaults: [
406 "binderRpcTest_defaults",
407 "binderRpcTest_static_defaults",
408 ],
409 cflags: [
410 "-DBINDER_RPC_SINGLE_THREADED",
411 ],
412 static_libs: [
413 "libbinder_rpc_single_threaded_no_kernel",
414 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000415}
416
Yifan Hongff73aa92021-09-17 21:28:01 -0700417cc_test {
418 name: "RpcTlsUtilsTest",
419 host_supported: true,
420 target: {
421 darwin: {
422 enabled: false,
423 },
424 android: {
425 test_suites: ["vts"],
426 },
427 },
428 defaults: [
429 "binder_test_defaults",
430 "libbinder_tls_shared_deps",
431 ],
432 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700433 "RpcTlsUtilsTest.cpp",
434 ],
435 shared_libs: [
436 "libbinder",
437 "libbase",
438 "libutils",
439 "liblog",
440 ],
441 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700442 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700443 "libbinder_tls_static",
444 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000445 test_suites: [
446 "general-tests",
447 "device-tests",
448 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700449}
450
Steven Morelandcda60852021-04-14 23:45:32 +0000451cc_benchmark {
452 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700453 defaults: [
454 "binder_test_defaults",
455 "libbinder_tls_shared_deps",
456 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000457 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000458 target: {
459 darwin: {
460 enabled: false,
461 },
462 },
Steven Morelandcda60852021-04-14 23:45:32 +0000463 srcs: [
464 "binderRpcBenchmark.cpp",
465 "IBinderRpcBenchmark.aidl",
466 ],
467 shared_libs: [
468 "libbase",
469 "libbinder",
470 "liblog",
471 "libutils",
472 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700473 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700474 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700475 "libbinder_tls_static",
476 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000477}
478
Steven Moreland5553ac42020-11-11 02:14:45 +0000479cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700480 name: "binderRpcWireProtocolTest",
481 host_supported: true,
482 target: {
483 darwin: {
484 enabled: false,
485 },
486 android: {
487 test_suites: ["vts"],
488 },
489 },
490 defaults: [
491 "binder_test_defaults",
492 ],
493 srcs: [
494 "binderRpcWireProtocolTest.cpp",
495 ],
496 shared_libs: [
497 "libbinder",
498 "libbase",
499 "libutils",
500 "libcutils",
501 "liblog",
502 ],
503 test_suites: ["general-tests"],
504}
505
506cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700507 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700508 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700509 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700510 shared_libs: [
511 "libbinder",
512 "libutils",
513 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700514 cflags: [
515 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700516 "-Wno-missing-field-initializers",
517 "-Wno-sign-compare",
518 "-O3",
519 ],
520}
Wei Wang78f2a372016-10-20 23:18:17 -0700521
522cc_test {
523 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700524 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700525 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700526 shared_libs: [
527 "libbinder",
528 "libutils",
529 "libbase",
530 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700531 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700532}
Howard Chenc135dbc2017-03-25 17:12:59 +0800533
534cc_test {
535 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700536 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700537 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800538 shared_libs: [
539 "libbinder",
540 "libutils",
541 "libbase",
542 ],
543}
Dan Stozad630e522016-12-01 15:16:31 -0800544
545cc_test {
546 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700547 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700548 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800549
550 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800551 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800552 ],
553
554 cpp_std: "experimental",
555 gnu_extensions: false,
556
557 shared_libs: [
558 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700559 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800560 "liblog",
561 "libutils",
562 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000563 test_suites: [
564 "device-tests",
565 "vts",
566 ],
Dan Shi80ada592019-09-13 09:17:17 -0700567 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800568}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700569
Steven Morelandf23dae22020-10-27 19:34:55 +0000570cc_test {
571 name: "binderClearBufTest",
572 defaults: ["binder_test_defaults"],
573 srcs: [
574 "binderClearBufTest.cpp",
575 ],
576
577 shared_libs: [
578 "libbase",
579 "libbinder",
580 "liblog",
581 "libutils",
582 ],
583
584 test_suites: ["general-tests"],
585 require_root: true,
586}
587
Steven Moreland12300a02019-08-02 13:27:15 -0700588aidl_interface {
589 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900590 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700591 srcs: [
592 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700593 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000594 backend: {
595 java: {
596 enabled: false,
597 },
598 },
Steven Moreland12300a02019-08-02 13:27:15 -0700599}
600
Steven Morelanddea3cf92019-07-16 18:06:55 -0700601cc_test {
602 name: "binderStabilityTest",
603 defaults: ["binder_test_defaults"],
604 srcs: [
605 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700606 ],
607
Steven Moreland13f84662020-07-23 21:30:41 +0000608 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700609 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700610 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700611 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700612 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700613 "libutils",
614 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700615 static_libs: [
616 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900617 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700618 ],
619
Steven Morelandea7659e2022-02-03 00:04:06 +0000620 test_suites: [
621 "device-tests",
622 "vts",
623 ],
Dan Shi302709b2019-09-19 15:28:15 -0700624 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700625}
Steven Moreland042ae822020-05-27 17:45:17 +0000626
627cc_test {
628 name: "binderAllocationLimits",
629 defaults: ["binder_test_defaults"],
630 srcs: ["binderAllocationLimits.cpp"],
631 shared_libs: [
632 "libbinder",
633 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000634 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000635 "libutils",
636 "libutilscallstack",
637 "libbase",
638 ],
639 test_suites: ["device-tests"],
640 require_root: true,
641}
Andy Hung73a14702020-11-24 13:04:46 -0800642
643cc_benchmark {
644 name: "binderParcelBenchmark",
645 defaults: ["binder_test_defaults"],
646 srcs: ["binderParcelBenchmark.cpp"],
647 shared_libs: [
648 "libbase",
649 "libbinder",
650 "liblog",
651 "libutils",
652 ],
653}
Yifan Hongaf766e62021-06-14 13:24:19 -0700654
655cc_test_host {
656 name: "binderUtilsHostTest",
657 defaults: ["binder_test_defaults"],
658 srcs: ["binderUtilsHostTest.cpp"],
659 shared_libs: [
660 "libbase",
661 "libbinder",
662 ],
663 static_libs: [
664 "libgmock",
665 ],
666 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700667 target: {
668 darwin: {
669 enabled: false,
670 },
671 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700672}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700673
674cc_test_host {
675 name: "binderHostDeviceTest",
676 defaults: ["binder_test_defaults"],
677 srcs: ["binderHostDeviceTest.cpp"],
678 test_config: "binderHostDeviceTest.xml",
679 shared_libs: [
680 "libbase",
681 "libbinder",
682 "liblog",
683 "libutils",
684 ],
685 static_libs: [
686 "libgmock",
687 ],
688 target_required: [
689 "binderHostDeviceTestService",
690 ],
691 test_suites: ["general-tests"],
692 target: {
693 darwin: {
694 enabled: false,
695 },
696 },
697 test_options: {
698 unit_test: false,
699 },
700}
701
702cc_test {
703 name: "binderHostDeviceTestService",
704 // The binary is named differently from the module so that PushFilePreparer pushes the binary
705 // directly, not the test module directory.
706 stem: "binderHostDeviceTest-service",
707 defaults: ["binder_test_defaults"],
708 gtest: false,
709 auto_gen_config: false,
710 srcs: ["binderHostDeviceTestService.cpp"],
711 shared_libs: [
712 "libbase",
713 "libbinder",
714 "liblog",
715 "libutils",
716 ],
717 test_suites: ["general-tests"],
718}
Pawanf00fabb2022-08-04 17:56:18 +0000719
720cc_defaults {
721 name: "service_fuzzer_defaults",
722 static_libs: [
723 "libbase",
724 "libbinder_random_parcel",
725 "libcutils",
726 ],
727 target: {
728 android: {
729 shared_libs: [
730 "libbinder_ndk",
731 "libbinder",
732 "libutils",
733 ],
734 },
735 host: {
736 static_libs: [
737 "libbinder_ndk",
738 "libbinder",
739 "libutils",
740 ],
741 },
742 darwin: {
743 enabled: false,
744 },
745 },
746 fuzz_config: {
747 cc: [
748 "smoreland@google.com",
749 "waghpawan@google.com",
750 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000751 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
752 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000753 },
754}