blob: 1babfd58138ff73cc855be66341ca7a57ab465d3 [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",
Steven Morelandea7659e2022-02-03 00:04:06 +0000103 ],
Steven Morelandcefba612020-11-05 22:57:06 +0000104 shared_libs: [
105 "libbinder",
Steven Morelandf80809b2021-10-07 18:09:20 -0700106 "libcutils",
Steven Morelandcefba612020-11-05 22:57:06 +0000107 "libutils",
108 ],
109 test_suites: ["general-tests"],
110}
111
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800112cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -0700113 name: "binderLibTest",
114 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800115 product_variables: {
116 binder32bit: {
117 cflags: ["-DBINDER_IPC_32BIT=1"],
118 },
119 },
120
Dan Willemsen59e086f2016-07-25 17:13:45 -0700121 srcs: ["binderLibTest.cpp"],
122 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -0700123 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700124 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -0700125 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700126 "libutils",
127 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700128 static_libs: [
129 "libgmock",
130 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000131 test_suites: [
132 "device-tests",
133 "vts",
134 ],
Dan Shi80ada592019-09-13 09:17:17 -0700135 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700136}
137
Steven Moreland37aff182021-03-26 02:04:16 +0000138aidl_interface {
139 name: "binderRpcTestIface",
140 host_supported: true,
141 unstable: true,
142 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700143 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000144 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700145 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000146 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000147 "IBinderRpcSession.aidl",
148 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700149 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000150 ],
151 backend: {
152 java: {
153 enabled: false,
154 },
155 },
156}
157
Yifan Honge0e53282021-09-23 18:37:21 -0700158cc_library_static {
159 name: "libbinder_tls_test_utils",
160 host_supported: true,
161 target: {
162 darwin: {
163 enabled: false,
164 },
165 },
166 defaults: [
167 "binder_test_defaults",
168 "libbinder_tls_shared_deps",
169 ],
170 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700171 "libbase",
172 "liblog",
173 ],
174 static_libs: [
175 "libbinder_tls_static",
176 ],
177 srcs: [
178 "RpcTlsTestUtils.cpp",
179 ],
180 export_include_dirs: [
181 "include_tls_test_utils",
182 ],
183 visibility: [
184 ":__subpackages__",
185 ],
186}
187
Andrei Homescu12106de2022-04-27 04:42:21 +0000188cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000189 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000190 host_supported: true,
191 target: {
192 darwin: {
193 enabled: false,
194 },
195 },
Steven Moreland37aff182021-03-26 02:04:16 +0000196 defaults: [
197 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000198 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000199
Andrei Homescu12106de2022-04-27 04:42:21 +0000200 static_libs: [
201 "libbinder_tls_static",
202 "libbinder_tls_test_utils",
203 "binderRpcTestIface-cpp",
204 "binderRpcTestIface-ndk",
205 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000206}
207
208cc_defaults {
209 name: "binderRpcTest_service_defaults",
210 defaults: [
211 "binderRpcTest_common_defaults",
212 ],
213 gtest: false,
214 auto_gen_config: false,
215 srcs: [
216 "binderRpcTestCommon.cpp",
217 "binderRpcTestService.cpp",
218 ],
219}
220
221cc_defaults {
222 name: "binderRpcTest_defaults",
223 target: {
224 android: {
225 test_suites: ["vts"],
226 },
227 },
228 defaults: [
229 "binderRpcTest_common_defaults",
230 ],
231
232 srcs: [
233 "binderRpcTest.cpp",
234 "binderRpcTestCommon.cpp",
235 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000236
237 test_suites: ["general-tests"],
238 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000239
240 data_bins: [
241 "binder_rpc_test_service",
242 "binder_rpc_test_service_no_kernel",
243 "binder_rpc_test_service_single_threaded",
244 "binder_rpc_test_service_single_threaded_no_kernel",
245 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000246}
247
Andrei Homescu2a298012022-06-15 01:08:54 +0000248cc_defaults {
249 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000250 cflags: [
251 "-DBINDER_WITH_KERNEL_IPC",
252 ],
253
Steven Moreland5553ac42020-11-11 02:14:45 +0000254 shared_libs: [
255 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000256 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000257 "libbase",
258 "libutils",
259 "libcutils",
260 "liblog",
261 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000262}
263
264cc_defaults {
265 name: "binderRpcTest_static_defaults",
266
267 shared_libs: [
268 "libutils",
269 // libcrypto_static is not visible to this module
270 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000271 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000272 static_libs: [
273 "libbase",
274 "libcutils",
275 "liblog",
276 "libssl",
277 ],
278
279 cflags: [
280 // Disable tests that require shared libraries,
281 // e.g., libbinder.so or libbinder_ndk.so
282 "-DBINDER_TEST_NO_SHARED_LIBS",
283 ],
284}
285
286cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000287 // The module name cannot start with "binderRpcTest" because
288 // then atest tries to execute it as part of binderRpcTest
289 name: "binder_rpc_test_service",
290 defaults: [
291 "binderRpcTest_service_defaults",
292 "binderRpcTest_shared_defaults",
293 "libbinder_tls_shared_deps",
294 ],
295}
296
297cc_test {
298 name: "binder_rpc_test_service_no_kernel",
299 defaults: [
300 "binderRpcTest_service_defaults",
301 "binderRpcTest_static_defaults",
302 ],
303 static_libs: [
304 "libbinder_rpc_no_kernel",
305 ],
306}
307
308cc_test {
309 name: "binder_rpc_test_service_single_threaded",
310 defaults: [
311 "binderRpcTest_service_defaults",
312 "binderRpcTest_static_defaults",
313 ],
314 cflags: [
315 "-DBINDER_RPC_SINGLE_THREADED",
316 "-DBINDER_WITH_KERNEL_IPC",
317 ],
318 static_libs: [
319 "libbinder_rpc_single_threaded",
320 ],
321}
322
323cc_test {
324 name: "binder_rpc_test_service_single_threaded_no_kernel",
325 defaults: [
326 "binderRpcTest_service_defaults",
327 "binderRpcTest_static_defaults",
328 ],
329 cflags: [
330 "-DBINDER_RPC_SINGLE_THREADED",
331 ],
332 static_libs: [
333 "libbinder_rpc_single_threaded_no_kernel",
334 ],
335}
336
337cc_test {
338 name: "binderRpcTest",
339 defaults: [
340 "binderRpcTest_defaults",
341 "binderRpcTest_shared_defaults",
342 "libbinder_tls_shared_deps",
343 ],
344}
345
346cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000347 name: "binderRpcTestNoKernel",
348 defaults: [
349 "binderRpcTest_defaults",
350 "binderRpcTest_static_defaults",
351 ],
352 static_libs: [
353 "libbinder_rpc_no_kernel",
354 ],
355}
356
357cc_test {
358 name: "binderRpcTestSingleThreaded",
359 defaults: [
360 "binderRpcTest_defaults",
361 "binderRpcTest_static_defaults",
362 ],
363 cflags: [
364 "-DBINDER_RPC_SINGLE_THREADED",
365 "-DBINDER_WITH_KERNEL_IPC",
366 ],
367 static_libs: [
368 "libbinder_rpc_single_threaded",
369 ],
370}
371
372cc_test {
373 name: "binderRpcTestSingleThreadedNoKernel",
374 defaults: [
375 "binderRpcTest_defaults",
376 "binderRpcTest_static_defaults",
377 ],
378 cflags: [
379 "-DBINDER_RPC_SINGLE_THREADED",
380 ],
381 static_libs: [
382 "libbinder_rpc_single_threaded_no_kernel",
383 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000384}
385
Yifan Hongff73aa92021-09-17 21:28:01 -0700386cc_test {
387 name: "RpcTlsUtilsTest",
388 host_supported: true,
389 target: {
390 darwin: {
391 enabled: false,
392 },
393 android: {
394 test_suites: ["vts"],
395 },
396 },
397 defaults: [
398 "binder_test_defaults",
399 "libbinder_tls_shared_deps",
400 ],
401 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700402 "RpcTlsUtilsTest.cpp",
403 ],
404 shared_libs: [
405 "libbinder",
406 "libbase",
407 "libutils",
408 "liblog",
409 ],
410 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700411 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700412 "libbinder_tls_static",
413 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000414 test_suites: [
415 "general-tests",
416 "device-tests",
417 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700418}
419
Steven Morelandcda60852021-04-14 23:45:32 +0000420cc_benchmark {
421 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700422 defaults: [
423 "binder_test_defaults",
424 "libbinder_tls_shared_deps",
425 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000426 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000427 target: {
428 darwin: {
429 enabled: false,
430 },
431 },
Steven Morelandcda60852021-04-14 23:45:32 +0000432 srcs: [
433 "binderRpcBenchmark.cpp",
434 "IBinderRpcBenchmark.aidl",
435 ],
436 shared_libs: [
437 "libbase",
438 "libbinder",
439 "liblog",
440 "libutils",
441 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700442 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700443 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700444 "libbinder_tls_static",
445 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000446}
447
Steven Moreland5553ac42020-11-11 02:14:45 +0000448cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700449 name: "binderRpcWireProtocolTest",
450 host_supported: true,
451 target: {
452 darwin: {
453 enabled: false,
454 },
455 android: {
456 test_suites: ["vts"],
457 },
458 },
459 defaults: [
460 "binder_test_defaults",
461 ],
462 srcs: [
463 "binderRpcWireProtocolTest.cpp",
464 ],
465 shared_libs: [
466 "libbinder",
467 "libbase",
468 "libutils",
469 "libcutils",
470 "liblog",
471 ],
472 test_suites: ["general-tests"],
473}
474
475cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700476 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700477 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700478 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700479 shared_libs: [
480 "libbinder",
481 "libutils",
482 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700483 cflags: [
484 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700485 "-Wno-missing-field-initializers",
486 "-Wno-sign-compare",
487 "-O3",
488 ],
489}
Wei Wang78f2a372016-10-20 23:18:17 -0700490
491cc_test {
492 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700493 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700494 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700495 shared_libs: [
496 "libbinder",
497 "libutils",
498 "libbase",
499 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700500 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700501}
Howard Chenc135dbc2017-03-25 17:12:59 +0800502
503cc_test {
504 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700505 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700506 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800507 shared_libs: [
508 "libbinder",
509 "libutils",
510 "libbase",
511 ],
512}
Dan Stozad630e522016-12-01 15:16:31 -0800513
514cc_test {
515 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700516 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700517 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800518
519 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800520 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800521 ],
522
523 cpp_std: "experimental",
524 gnu_extensions: false,
525
526 shared_libs: [
527 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700528 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800529 "liblog",
530 "libutils",
531 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000532 test_suites: [
533 "device-tests",
534 "vts",
535 ],
Dan Shi80ada592019-09-13 09:17:17 -0700536 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800537}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700538
Steven Morelandf23dae22020-10-27 19:34:55 +0000539cc_test {
540 name: "binderClearBufTest",
541 defaults: ["binder_test_defaults"],
542 srcs: [
543 "binderClearBufTest.cpp",
544 ],
545
546 shared_libs: [
547 "libbase",
548 "libbinder",
549 "liblog",
550 "libutils",
551 ],
552
553 test_suites: ["general-tests"],
554 require_root: true,
555}
556
Steven Moreland12300a02019-08-02 13:27:15 -0700557aidl_interface {
558 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900559 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700560 srcs: [
561 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700562 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000563 backend: {
564 java: {
565 enabled: false,
566 },
567 },
Steven Moreland12300a02019-08-02 13:27:15 -0700568}
569
Steven Morelanddea3cf92019-07-16 18:06:55 -0700570cc_test {
571 name: "binderStabilityTest",
572 defaults: ["binder_test_defaults"],
573 srcs: [
574 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700575 ],
576
Steven Moreland13f84662020-07-23 21:30:41 +0000577 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700578 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700579 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700580 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700581 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700582 "libutils",
583 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700584 static_libs: [
585 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900586 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700587 ],
588
Steven Morelandea7659e2022-02-03 00:04:06 +0000589 test_suites: [
590 "device-tests",
591 "vts",
592 ],
Dan Shi302709b2019-09-19 15:28:15 -0700593 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700594}
Steven Moreland042ae822020-05-27 17:45:17 +0000595
596cc_test {
597 name: "binderAllocationLimits",
598 defaults: ["binder_test_defaults"],
599 srcs: ["binderAllocationLimits.cpp"],
600 shared_libs: [
601 "libbinder",
602 "liblog",
603 "libutils",
604 "libutilscallstack",
605 "libbase",
606 ],
607 test_suites: ["device-tests"],
608 require_root: true,
609}
Andy Hung73a14702020-11-24 13:04:46 -0800610
611cc_benchmark {
612 name: "binderParcelBenchmark",
613 defaults: ["binder_test_defaults"],
614 srcs: ["binderParcelBenchmark.cpp"],
615 shared_libs: [
616 "libbase",
617 "libbinder",
618 "liblog",
619 "libutils",
620 ],
621}
Yifan Hongaf766e62021-06-14 13:24:19 -0700622
623cc_test_host {
624 name: "binderUtilsHostTest",
625 defaults: ["binder_test_defaults"],
626 srcs: ["binderUtilsHostTest.cpp"],
627 shared_libs: [
628 "libbase",
629 "libbinder",
630 ],
631 static_libs: [
632 "libgmock",
633 ],
634 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700635 target: {
636 darwin: {
637 enabled: false,
638 },
639 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700640}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700641
642cc_test_host {
643 name: "binderHostDeviceTest",
644 defaults: ["binder_test_defaults"],
645 srcs: ["binderHostDeviceTest.cpp"],
646 test_config: "binderHostDeviceTest.xml",
647 shared_libs: [
648 "libbase",
649 "libbinder",
650 "liblog",
651 "libutils",
652 ],
653 static_libs: [
654 "libgmock",
655 ],
656 target_required: [
657 "binderHostDeviceTestService",
658 ],
659 test_suites: ["general-tests"],
660 target: {
661 darwin: {
662 enabled: false,
663 },
664 },
665 test_options: {
666 unit_test: false,
667 },
668}
669
670cc_test {
671 name: "binderHostDeviceTestService",
672 // The binary is named differently from the module so that PushFilePreparer pushes the binary
673 // directly, not the test module directory.
674 stem: "binderHostDeviceTest-service",
675 defaults: ["binder_test_defaults"],
676 gtest: false,
677 auto_gen_config: false,
678 srcs: ["binderHostDeviceTestService.cpp"],
679 shared_libs: [
680 "libbase",
681 "libbinder",
682 "liblog",
683 "libutils",
684 ],
685 test_suites: ["general-tests"],
686}
Pawanf00fabb2022-08-04 17:56:18 +0000687
688cc_defaults {
689 name: "service_fuzzer_defaults",
690 static_libs: [
691 "libbase",
692 "libbinder_random_parcel",
693 "libcutils",
694 ],
695 target: {
696 android: {
697 shared_libs: [
698 "libbinder_ndk",
699 "libbinder",
700 "libutils",
701 ],
702 },
703 host: {
704 static_libs: [
705 "libbinder_ndk",
706 "libbinder",
707 "libutils",
708 ],
709 },
710 darwin: {
711 enabled: false,
712 },
713 },
714 fuzz_config: {
715 cc: [
716 "smoreland@google.com",
717 "waghpawan@google.com",
718 ],
719 },
720}