blob: 61a047b455daa4d3c8f530cab75a5e264ade838d [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",
Andrei Homescud65666d2023-03-03 07:28:02 +0000141 vendor_available: true,
Steven Moreland37aff182021-03-26 02:04:16 +0000142 host_supported: true,
143 unstable: true,
144 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700145 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000146 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700147 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000148 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000149 "IBinderRpcSession.aidl",
150 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700151 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000152 ],
153 backend: {
154 java: {
155 enabled: false,
156 },
157 },
158}
159
Yifan Honge0e53282021-09-23 18:37:21 -0700160cc_library_static {
161 name: "libbinder_tls_test_utils",
162 host_supported: true,
Andrei Homescud65666d2023-03-03 07:28:02 +0000163 vendor_available: true,
Yifan Honge0e53282021-09-23 18:37:21 -0700164 target: {
165 darwin: {
166 enabled: false,
167 },
168 },
169 defaults: [
170 "binder_test_defaults",
171 "libbinder_tls_shared_deps",
172 ],
173 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700174 "libbase",
175 "liblog",
176 ],
177 static_libs: [
178 "libbinder_tls_static",
179 ],
180 srcs: [
181 "RpcTlsTestUtils.cpp",
182 ],
183 export_include_dirs: [
184 "include_tls_test_utils",
185 ],
186 visibility: [
187 ":__subpackages__",
188 ],
189}
190
Andrei Homescu12106de2022-04-27 04:42:21 +0000191cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000192 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000193 host_supported: true,
194 target: {
195 darwin: {
196 enabled: false,
197 },
198 },
Steven Moreland37aff182021-03-26 02:04:16 +0000199 defaults: [
200 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000201 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000202
Andrei Homescu12106de2022-04-27 04:42:21 +0000203 static_libs: [
204 "libbinder_tls_static",
205 "libbinder_tls_test_utils",
206 "binderRpcTestIface-cpp",
207 "binderRpcTestIface-ndk",
208 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000209}
210
211cc_defaults {
212 name: "binderRpcTest_service_defaults",
213 defaults: [
214 "binderRpcTest_common_defaults",
215 ],
216 gtest: false,
217 auto_gen_config: false,
218 srcs: [
219 "binderRpcTestCommon.cpp",
220 "binderRpcTestService.cpp",
221 ],
222}
223
224cc_defaults {
225 name: "binderRpcTest_defaults",
226 target: {
227 android: {
228 test_suites: ["vts"],
229 },
230 },
231 defaults: [
232 "binderRpcTest_common_defaults",
233 ],
234
235 srcs: [
236 "binderRpcTest.cpp",
237 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000238 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000239 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000240
241 test_suites: ["general-tests"],
242 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000243
244 data_bins: [
245 "binder_rpc_test_service",
246 "binder_rpc_test_service_no_kernel",
247 "binder_rpc_test_service_single_threaded",
248 "binder_rpc_test_service_single_threaded_no_kernel",
249 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000250}
251
Andrei Homescu2a298012022-06-15 01:08:54 +0000252cc_defaults {
253 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000254 cflags: [
255 "-DBINDER_WITH_KERNEL_IPC",
256 ],
257
Steven Moreland5553ac42020-11-11 02:14:45 +0000258 shared_libs: [
259 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000260 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000261 "libbase",
262 "libutils",
263 "libcutils",
264 "liblog",
265 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000266}
267
268cc_defaults {
269 name: "binderRpcTest_static_defaults",
270
271 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000272 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000273 "libutils",
274 // libcrypto_static is not visible to this module
275 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000276 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000277 static_libs: [
278 "libbase",
279 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000280 "libssl",
281 ],
282
283 cflags: [
284 // Disable tests that require shared libraries,
285 // e.g., libbinder.so or libbinder_ndk.so
286 "-DBINDER_TEST_NO_SHARED_LIBS",
287 ],
288}
289
290cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000291 // The module name cannot start with "binderRpcTest" because
292 // then atest tries to execute it as part of binderRpcTest
293 name: "binder_rpc_test_service",
294 defaults: [
295 "binderRpcTest_service_defaults",
296 "binderRpcTest_shared_defaults",
297 "libbinder_tls_shared_deps",
298 ],
299}
300
301cc_test {
302 name: "binder_rpc_test_service_no_kernel",
303 defaults: [
304 "binderRpcTest_service_defaults",
305 "binderRpcTest_static_defaults",
306 ],
307 static_libs: [
308 "libbinder_rpc_no_kernel",
309 ],
310}
311
312cc_test {
313 name: "binder_rpc_test_service_single_threaded",
314 defaults: [
315 "binderRpcTest_service_defaults",
316 "binderRpcTest_static_defaults",
317 ],
318 cflags: [
319 "-DBINDER_RPC_SINGLE_THREADED",
320 "-DBINDER_WITH_KERNEL_IPC",
321 ],
322 static_libs: [
323 "libbinder_rpc_single_threaded",
324 ],
325}
326
327cc_test {
328 name: "binder_rpc_test_service_single_threaded_no_kernel",
329 defaults: [
330 "binderRpcTest_service_defaults",
331 "binderRpcTest_static_defaults",
332 ],
333 cflags: [
334 "-DBINDER_RPC_SINGLE_THREADED",
335 ],
336 static_libs: [
337 "libbinder_rpc_single_threaded_no_kernel",
338 ],
339}
340
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000341cc_binary {
342 name: "binderRpcTestService_on_trusty_mock",
343 defaults: [
344 "trusty_mock_defaults",
345 ],
346
347 srcs: [
348 "binderRpcTestCommon.cpp",
349 "binderRpcTestServiceTrusty.cpp",
350 ],
351
352 shared_libs: [
353 "libbinder_on_trusty_mock",
354 "libbase",
355 "libutils",
356 "libcutils",
357 ],
358
359 static_libs: [
360 "binderRpcTestIface-cpp",
361 ],
362}
363
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000364cc_binary {
365 name: "binderRpcTest_on_trusty_mock",
366 defaults: [
367 "trusty_mock_defaults",
368 ],
369
370 srcs: [
371 "binderRpcUniversalTests.cpp",
372 "binderRpcTestCommon.cpp",
373 "binderRpcTestTrusty.cpp",
374 ],
375
376 shared_libs: [
377 "libbinder_on_trusty_mock",
378 "libbase",
379 "libutils",
380 "libcutils",
381 ],
382
383 static_libs: [
384 "binderRpcTestIface-cpp",
385 "libgtest",
386 ],
387}
388
Andrei Homescu2a298012022-06-15 01:08:54 +0000389cc_test {
390 name: "binderRpcTest",
391 defaults: [
392 "binderRpcTest_defaults",
393 "binderRpcTest_shared_defaults",
394 "libbinder_tls_shared_deps",
395 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000396
397 // Add the Trusty mock library as a fake dependency so it gets built
398 required: [
399 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000400 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000401 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000402 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000403}
404
405cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000406 name: "binderRpcTestNoKernel",
407 defaults: [
408 "binderRpcTest_defaults",
409 "binderRpcTest_static_defaults",
410 ],
411 static_libs: [
412 "libbinder_rpc_no_kernel",
413 ],
414}
415
416cc_test {
417 name: "binderRpcTestSingleThreaded",
418 defaults: [
419 "binderRpcTest_defaults",
420 "binderRpcTest_static_defaults",
421 ],
422 cflags: [
423 "-DBINDER_RPC_SINGLE_THREADED",
424 "-DBINDER_WITH_KERNEL_IPC",
425 ],
426 static_libs: [
427 "libbinder_rpc_single_threaded",
428 ],
429}
430
431cc_test {
432 name: "binderRpcTestSingleThreadedNoKernel",
433 defaults: [
434 "binderRpcTest_defaults",
435 "binderRpcTest_static_defaults",
436 ],
437 cflags: [
438 "-DBINDER_RPC_SINGLE_THREADED",
439 ],
440 static_libs: [
441 "libbinder_rpc_single_threaded_no_kernel",
442 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000443}
444
Yifan Hongff73aa92021-09-17 21:28:01 -0700445cc_test {
Andrei Homescud65666d2023-03-03 07:28:02 +0000446 name: "binderRpcToTrustyTest",
447 vendor: true,
448 host_supported: false,
449 defaults: [
450 "binderRpcTest_common_defaults",
451 "binderRpcTest_static_defaults",
452 ],
453
454 srcs: [
455 "binderRpcTest.cpp",
456 "binderRpcTestCommon.cpp",
457 "binderRpcUniversalTests.cpp",
458 ],
459
460 cflags: [
461 "-DBINDER_RPC_TO_TRUSTY_TEST",
462 ],
463
464 static_libs: [
465 // We want to link libbinder statically so we can push the binary
466 // to the device for testing independently of the library
467 "libbinder_rpc_no_kernel",
468 "libbinder_trusty",
469 "libtrusty",
470 ],
471
472 test_suites: ["device-tests"],
473 require_root: true,
474}
475
476cc_test {
Yifan Hongff73aa92021-09-17 21:28:01 -0700477 name: "RpcTlsUtilsTest",
478 host_supported: true,
479 target: {
480 darwin: {
481 enabled: false,
482 },
483 android: {
484 test_suites: ["vts"],
485 },
486 },
487 defaults: [
488 "binder_test_defaults",
489 "libbinder_tls_shared_deps",
490 ],
491 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700492 "RpcTlsUtilsTest.cpp",
493 ],
494 shared_libs: [
495 "libbinder",
496 "libbase",
497 "libutils",
498 "liblog",
499 ],
500 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700501 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700502 "libbinder_tls_static",
503 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000504 test_suites: [
505 "general-tests",
506 "device-tests",
507 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700508}
509
Steven Morelandcda60852021-04-14 23:45:32 +0000510cc_benchmark {
511 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700512 defaults: [
513 "binder_test_defaults",
514 "libbinder_tls_shared_deps",
515 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000516 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000517 target: {
518 darwin: {
519 enabled: false,
520 },
521 },
Steven Morelandcda60852021-04-14 23:45:32 +0000522 srcs: [
523 "binderRpcBenchmark.cpp",
524 "IBinderRpcBenchmark.aidl",
525 ],
526 shared_libs: [
527 "libbase",
528 "libbinder",
529 "liblog",
530 "libutils",
531 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700532 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700533 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700534 "libbinder_tls_static",
535 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000536}
537
Steven Moreland5553ac42020-11-11 02:14:45 +0000538cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700539 name: "binderRpcWireProtocolTest",
540 host_supported: true,
541 target: {
542 darwin: {
543 enabled: false,
544 },
545 android: {
546 test_suites: ["vts"],
547 },
548 },
549 defaults: [
550 "binder_test_defaults",
551 ],
552 srcs: [
553 "binderRpcWireProtocolTest.cpp",
554 ],
555 shared_libs: [
556 "libbinder",
557 "libbase",
558 "libutils",
559 "libcutils",
560 "liblog",
561 ],
562 test_suites: ["general-tests"],
563}
564
565cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700566 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700567 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700568 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700569 shared_libs: [
570 "libbinder",
571 "libutils",
572 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700573 cflags: [
574 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700575 "-Wno-missing-field-initializers",
576 "-Wno-sign-compare",
577 "-O3",
578 ],
579}
Wei Wang78f2a372016-10-20 23:18:17 -0700580
581cc_test {
582 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700583 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700584 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700585 shared_libs: [
586 "libbinder",
587 "libutils",
588 "libbase",
589 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700590 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700591}
Howard Chenc135dbc2017-03-25 17:12:59 +0800592
593cc_test {
594 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700595 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700596 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800597 shared_libs: [
598 "libbinder",
599 "libutils",
600 "libbase",
601 ],
602}
Dan Stozad630e522016-12-01 15:16:31 -0800603
604cc_test {
605 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700606 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700607 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800608
609 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800610 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800611 ],
612
613 cpp_std: "experimental",
614 gnu_extensions: false,
615
616 shared_libs: [
617 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700618 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800619 "liblog",
620 "libutils",
621 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000622 test_suites: [
623 "device-tests",
624 "vts",
625 ],
Dan Shi80ada592019-09-13 09:17:17 -0700626 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800627}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700628
Steven Morelandf23dae22020-10-27 19:34:55 +0000629cc_test {
630 name: "binderClearBufTest",
631 defaults: ["binder_test_defaults"],
632 srcs: [
633 "binderClearBufTest.cpp",
634 ],
635
636 shared_libs: [
637 "libbase",
638 "libbinder",
639 "liblog",
640 "libutils",
641 ],
642
643 test_suites: ["general-tests"],
644 require_root: true,
645}
646
Steven Moreland12300a02019-08-02 13:27:15 -0700647aidl_interface {
648 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900649 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700650 srcs: [
651 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700652 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000653 backend: {
654 java: {
655 enabled: false,
656 },
657 },
Steven Moreland12300a02019-08-02 13:27:15 -0700658}
659
Steven Morelanddea3cf92019-07-16 18:06:55 -0700660cc_test {
661 name: "binderStabilityTest",
662 defaults: ["binder_test_defaults"],
663 srcs: [
664 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700665 ],
666
Steven Moreland13f84662020-07-23 21:30:41 +0000667 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700668 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700669 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700670 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700671 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700672 "libutils",
673 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700674 static_libs: [
675 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900676 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700677 ],
678
Steven Morelandea7659e2022-02-03 00:04:06 +0000679 test_suites: [
680 "device-tests",
681 "vts",
682 ],
Dan Shi302709b2019-09-19 15:28:15 -0700683 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700684}
Steven Moreland042ae822020-05-27 17:45:17 +0000685
686cc_test {
687 name: "binderAllocationLimits",
688 defaults: ["binder_test_defaults"],
689 srcs: ["binderAllocationLimits.cpp"],
690 shared_libs: [
691 "libbinder",
692 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000693 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000694 "libutils",
695 "libutilscallstack",
696 "libbase",
697 ],
698 test_suites: ["device-tests"],
699 require_root: true,
700}
Andy Hung73a14702020-11-24 13:04:46 -0800701
702cc_benchmark {
703 name: "binderParcelBenchmark",
704 defaults: ["binder_test_defaults"],
705 srcs: ["binderParcelBenchmark.cpp"],
706 shared_libs: [
707 "libbase",
708 "libbinder",
709 "liblog",
710 "libutils",
711 ],
712}
Yifan Hongaf766e62021-06-14 13:24:19 -0700713
714cc_test_host {
715 name: "binderUtilsHostTest",
716 defaults: ["binder_test_defaults"],
717 srcs: ["binderUtilsHostTest.cpp"],
718 shared_libs: [
719 "libbase",
720 "libbinder",
721 ],
722 static_libs: [
723 "libgmock",
724 ],
725 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700726 target: {
727 darwin: {
728 enabled: false,
729 },
730 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700731}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700732
733cc_test_host {
734 name: "binderHostDeviceTest",
735 defaults: ["binder_test_defaults"],
736 srcs: ["binderHostDeviceTest.cpp"],
737 test_config: "binderHostDeviceTest.xml",
738 shared_libs: [
739 "libbase",
740 "libbinder",
741 "liblog",
742 "libutils",
743 ],
744 static_libs: [
745 "libgmock",
746 ],
747 target_required: [
748 "binderHostDeviceTestService",
749 ],
750 test_suites: ["general-tests"],
751 target: {
752 darwin: {
753 enabled: false,
754 },
755 },
756 test_options: {
757 unit_test: false,
758 },
759}
760
761cc_test {
762 name: "binderHostDeviceTestService",
763 // The binary is named differently from the module so that PushFilePreparer pushes the binary
764 // directly, not the test module directory.
765 stem: "binderHostDeviceTest-service",
766 defaults: ["binder_test_defaults"],
767 gtest: false,
768 auto_gen_config: false,
769 srcs: ["binderHostDeviceTestService.cpp"],
770 shared_libs: [
771 "libbase",
772 "libbinder",
773 "liblog",
774 "libutils",
775 ],
776 test_suites: ["general-tests"],
777}
Pawanf00fabb2022-08-04 17:56:18 +0000778
779cc_defaults {
780 name: "service_fuzzer_defaults",
781 static_libs: [
782 "libbase",
783 "libbinder_random_parcel",
784 "libcutils",
785 ],
786 target: {
787 android: {
788 shared_libs: [
789 "libbinder_ndk",
790 "libbinder",
791 "libutils",
792 ],
793 },
794 host: {
795 static_libs: [
796 "libbinder_ndk",
797 "libbinder",
798 "libutils",
799 ],
800 },
801 darwin: {
802 enabled: false,
803 },
804 },
805 fuzz_config: {
806 cc: [
807 "smoreland@google.com",
808 "waghpawan@google.com",
809 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000810 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
811 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000812 },
813}