blob: 7a462db79748ed45bae6593cde3273f23afb984a [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 Morelanda8244b92023-04-20 23:34:11 +0000114 name: "binderRecordReplayTest",
115 srcs: ["binderRecordReplayTest.cpp"],
116 shared_libs: [
117 "libbinder",
118 "libcutils",
119 "libutils",
120 ],
121 static_libs: [
122 "binderRecordReplayTestIface-cpp",
123 ],
124 test_suites: ["general-tests"],
125}
126
127aidl_interface {
128 name: "binderRecordReplayTestIface",
129 unstable: true,
130 srcs: [
131 "IBinderRecordReplayTest.aidl",
132 ],
133}
134
135cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -0700136 name: "binderLibTest",
137 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800138 product_variables: {
139 binder32bit: {
140 cflags: ["-DBINDER_IPC_32BIT=1"],
141 },
142 },
143
Dan Willemsen59e086f2016-07-25 17:13:45 -0700144 srcs: ["binderLibTest.cpp"],
145 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -0700146 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700147 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -0700148 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700149 "libutils",
150 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700151 static_libs: [
152 "libgmock",
153 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000154 test_suites: [
155 "device-tests",
156 "vts",
157 ],
Dan Shi80ada592019-09-13 09:17:17 -0700158 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700159}
160
Steven Moreland37aff182021-03-26 02:04:16 +0000161aidl_interface {
162 name: "binderRpcTestIface",
Andrei Homescud65666d2023-03-03 07:28:02 +0000163 vendor_available: true,
Steven Moreland37aff182021-03-26 02:04:16 +0000164 host_supported: true,
165 unstable: true,
166 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700167 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000168 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700169 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000170 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000171 "IBinderRpcSession.aidl",
172 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700173 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000174 ],
175 backend: {
176 java: {
177 enabled: false,
178 },
179 },
180}
181
Yifan Honge0e53282021-09-23 18:37:21 -0700182cc_library_static {
183 name: "libbinder_tls_test_utils",
184 host_supported: true,
Andrei Homescud65666d2023-03-03 07:28:02 +0000185 vendor_available: true,
Yifan Honge0e53282021-09-23 18:37:21 -0700186 target: {
187 darwin: {
188 enabled: false,
189 },
190 },
191 defaults: [
192 "binder_test_defaults",
193 "libbinder_tls_shared_deps",
194 ],
195 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700196 "libbase",
197 "liblog",
198 ],
199 static_libs: [
200 "libbinder_tls_static",
201 ],
202 srcs: [
203 "RpcTlsTestUtils.cpp",
204 ],
205 export_include_dirs: [
206 "include_tls_test_utils",
207 ],
208 visibility: [
209 ":__subpackages__",
210 ],
211}
212
Andrei Homescu12106de2022-04-27 04:42:21 +0000213cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000214 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000215 host_supported: true,
216 target: {
217 darwin: {
218 enabled: false,
219 },
220 },
Steven Moreland37aff182021-03-26 02:04:16 +0000221 defaults: [
222 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000223 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000224
Andrei Homescu12106de2022-04-27 04:42:21 +0000225 static_libs: [
226 "libbinder_tls_static",
227 "libbinder_tls_test_utils",
228 "binderRpcTestIface-cpp",
229 "binderRpcTestIface-ndk",
230 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000231}
232
233cc_defaults {
234 name: "binderRpcTest_service_defaults",
235 defaults: [
236 "binderRpcTest_common_defaults",
237 ],
238 gtest: false,
239 auto_gen_config: false,
240 srcs: [
241 "binderRpcTestCommon.cpp",
242 "binderRpcTestService.cpp",
243 ],
244}
245
246cc_defaults {
247 name: "binderRpcTest_defaults",
248 target: {
249 android: {
250 test_suites: ["vts"],
251 },
252 },
253 defaults: [
254 "binderRpcTest_common_defaults",
255 ],
256
257 srcs: [
258 "binderRpcTest.cpp",
259 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000260 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000261 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000262
Steven Moreland20531612023-04-04 18:03:24 +0000263 // This test uses a lot of resources and takes a long time. Due to
264 // design of several tests, it is also very sensitive to resource
265 // contention on the device. b/276820894
266 test_options: {
267 unit_test: false,
268 },
269
Andrei Homescu12106de2022-04-27 04:42:21 +0000270 test_suites: ["general-tests"],
271 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000272
273 data_bins: [
274 "binder_rpc_test_service",
275 "binder_rpc_test_service_no_kernel",
276 "binder_rpc_test_service_single_threaded",
277 "binder_rpc_test_service_single_threaded_no_kernel",
278 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000279}
280
Andrei Homescu2a298012022-06-15 01:08:54 +0000281cc_defaults {
282 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000283 cflags: [
284 "-DBINDER_WITH_KERNEL_IPC",
285 ],
286
Steven Moreland5553ac42020-11-11 02:14:45 +0000287 shared_libs: [
288 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000289 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000290 "libbase",
291 "libutils",
292 "libcutils",
293 "liblog",
294 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000295}
296
297cc_defaults {
298 name: "binderRpcTest_static_defaults",
299
300 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000301 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000302 "libutils",
303 // libcrypto_static is not visible to this module
304 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000305 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000306 static_libs: [
307 "libbase",
308 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000309 "libssl",
310 ],
311
312 cflags: [
313 // Disable tests that require shared libraries,
314 // e.g., libbinder.so or libbinder_ndk.so
315 "-DBINDER_TEST_NO_SHARED_LIBS",
316 ],
317}
318
319cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000320 // The module name cannot start with "binderRpcTest" because
321 // then atest tries to execute it as part of binderRpcTest
322 name: "binder_rpc_test_service",
323 defaults: [
324 "binderRpcTest_service_defaults",
325 "binderRpcTest_shared_defaults",
326 "libbinder_tls_shared_deps",
327 ],
328}
329
330cc_test {
331 name: "binder_rpc_test_service_no_kernel",
332 defaults: [
333 "binderRpcTest_service_defaults",
334 "binderRpcTest_static_defaults",
335 ],
336 static_libs: [
337 "libbinder_rpc_no_kernel",
338 ],
339}
340
341cc_test {
342 name: "binder_rpc_test_service_single_threaded",
343 defaults: [
344 "binderRpcTest_service_defaults",
345 "binderRpcTest_static_defaults",
346 ],
347 cflags: [
348 "-DBINDER_RPC_SINGLE_THREADED",
349 "-DBINDER_WITH_KERNEL_IPC",
350 ],
351 static_libs: [
352 "libbinder_rpc_single_threaded",
353 ],
354}
355
356cc_test {
357 name: "binder_rpc_test_service_single_threaded_no_kernel",
358 defaults: [
359 "binderRpcTest_service_defaults",
360 "binderRpcTest_static_defaults",
361 ],
362 cflags: [
363 "-DBINDER_RPC_SINGLE_THREADED",
364 ],
365 static_libs: [
366 "libbinder_rpc_single_threaded_no_kernel",
367 ],
368}
369
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000370cc_binary {
371 name: "binderRpcTestService_on_trusty_mock",
372 defaults: [
373 "trusty_mock_defaults",
374 ],
375
376 srcs: [
377 "binderRpcTestCommon.cpp",
378 "binderRpcTestServiceTrusty.cpp",
379 ],
380
381 shared_libs: [
382 "libbinder_on_trusty_mock",
383 "libbase",
384 "libutils",
385 "libcutils",
386 ],
387
388 static_libs: [
389 "binderRpcTestIface-cpp",
390 ],
391}
392
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000393cc_binary {
394 name: "binderRpcTest_on_trusty_mock",
395 defaults: [
396 "trusty_mock_defaults",
397 ],
398
399 srcs: [
400 "binderRpcUniversalTests.cpp",
401 "binderRpcTestCommon.cpp",
402 "binderRpcTestTrusty.cpp",
403 ],
404
405 shared_libs: [
406 "libbinder_on_trusty_mock",
407 "libbase",
408 "libutils",
409 "libcutils",
410 ],
411
412 static_libs: [
413 "binderRpcTestIface-cpp",
414 "libgtest",
415 ],
416}
417
Andrei Homescu2a298012022-06-15 01:08:54 +0000418cc_test {
419 name: "binderRpcTest",
420 defaults: [
421 "binderRpcTest_defaults",
422 "binderRpcTest_shared_defaults",
423 "libbinder_tls_shared_deps",
424 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000425
426 // Add the Trusty mock library as a fake dependency so it gets built
427 required: [
428 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000429 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000430 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000431 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000432}
433
434cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000435 name: "binderRpcTestNoKernel",
436 defaults: [
437 "binderRpcTest_defaults",
438 "binderRpcTest_static_defaults",
439 ],
440 static_libs: [
441 "libbinder_rpc_no_kernel",
442 ],
443}
444
445cc_test {
446 name: "binderRpcTestSingleThreaded",
447 defaults: [
448 "binderRpcTest_defaults",
449 "binderRpcTest_static_defaults",
450 ],
451 cflags: [
452 "-DBINDER_RPC_SINGLE_THREADED",
453 "-DBINDER_WITH_KERNEL_IPC",
454 ],
455 static_libs: [
456 "libbinder_rpc_single_threaded",
457 ],
458}
459
460cc_test {
461 name: "binderRpcTestSingleThreadedNoKernel",
462 defaults: [
463 "binderRpcTest_defaults",
464 "binderRpcTest_static_defaults",
465 ],
466 cflags: [
467 "-DBINDER_RPC_SINGLE_THREADED",
468 ],
469 static_libs: [
470 "libbinder_rpc_single_threaded_no_kernel",
471 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000472}
473
Yifan Hongff73aa92021-09-17 21:28:01 -0700474cc_test {
Andrei Homescud65666d2023-03-03 07:28:02 +0000475 name: "binderRpcToTrustyTest",
476 vendor: true,
477 host_supported: false,
478 defaults: [
479 "binderRpcTest_common_defaults",
480 "binderRpcTest_static_defaults",
481 ],
482
483 srcs: [
484 "binderRpcTest.cpp",
485 "binderRpcTestCommon.cpp",
486 "binderRpcUniversalTests.cpp",
487 ],
488
489 cflags: [
490 "-DBINDER_RPC_TO_TRUSTY_TEST",
491 ],
492
493 static_libs: [
494 // We want to link libbinder statically so we can push the binary
495 // to the device for testing independently of the library
496 "libbinder_rpc_no_kernel",
497 "libbinder_trusty",
498 "libtrusty",
499 ],
500
501 test_suites: ["device-tests"],
502 require_root: true,
503}
504
505cc_test {
Yifan Hongff73aa92021-09-17 21:28:01 -0700506 name: "RpcTlsUtilsTest",
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 "libbinder_tls_shared_deps",
519 ],
520 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700521 "RpcTlsUtilsTest.cpp",
522 ],
523 shared_libs: [
524 "libbinder",
525 "libbase",
526 "libutils",
527 "liblog",
528 ],
529 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700530 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700531 "libbinder_tls_static",
532 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000533 test_suites: [
534 "general-tests",
535 "device-tests",
536 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700537}
538
Steven Morelandcda60852021-04-14 23:45:32 +0000539cc_benchmark {
540 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700541 defaults: [
542 "binder_test_defaults",
543 "libbinder_tls_shared_deps",
544 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000545 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000546 target: {
547 darwin: {
548 enabled: false,
549 },
550 },
Steven Morelandcda60852021-04-14 23:45:32 +0000551 srcs: [
552 "binderRpcBenchmark.cpp",
553 "IBinderRpcBenchmark.aidl",
554 ],
555 shared_libs: [
556 "libbase",
557 "libbinder",
558 "liblog",
559 "libutils",
560 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700561 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700562 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700563 "libbinder_tls_static",
564 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000565}
566
Steven Moreland5553ac42020-11-11 02:14:45 +0000567cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700568 name: "binderRpcWireProtocolTest",
569 host_supported: true,
570 target: {
571 darwin: {
572 enabled: false,
573 },
574 android: {
575 test_suites: ["vts"],
576 },
577 },
578 defaults: [
579 "binder_test_defaults",
580 ],
581 srcs: [
582 "binderRpcWireProtocolTest.cpp",
583 ],
584 shared_libs: [
585 "libbinder",
586 "libbase",
587 "libutils",
588 "libcutils",
589 "liblog",
590 ],
591 test_suites: ["general-tests"],
592}
593
594cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700595 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700596 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700597 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700598 shared_libs: [
599 "libbinder",
600 "libutils",
601 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700602 cflags: [
603 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700604 "-Wno-missing-field-initializers",
605 "-Wno-sign-compare",
606 "-O3",
607 ],
608}
Wei Wang78f2a372016-10-20 23:18:17 -0700609
610cc_test {
611 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700612 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700613 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700614 shared_libs: [
615 "libbinder",
616 "libutils",
617 "libbase",
618 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700619 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700620}
Howard Chenc135dbc2017-03-25 17:12:59 +0800621
622cc_test {
623 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700624 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700625 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800626 shared_libs: [
627 "libbinder",
628 "libutils",
629 "libbase",
630 ],
631}
Dan Stozad630e522016-12-01 15:16:31 -0800632
633cc_test {
634 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700635 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700636 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800637
638 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800639 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800640 ],
641
642 cpp_std: "experimental",
643 gnu_extensions: false,
644
645 shared_libs: [
646 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700647 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800648 "liblog",
649 "libutils",
650 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000651 test_suites: [
652 "device-tests",
653 "vts",
654 ],
Dan Shi80ada592019-09-13 09:17:17 -0700655 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800656}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700657
Steven Morelandf23dae22020-10-27 19:34:55 +0000658cc_test {
659 name: "binderClearBufTest",
660 defaults: ["binder_test_defaults"],
661 srcs: [
662 "binderClearBufTest.cpp",
663 ],
664
665 shared_libs: [
666 "libbase",
667 "libbinder",
668 "liblog",
669 "libutils",
670 ],
671
672 test_suites: ["general-tests"],
673 require_root: true,
674}
675
Steven Moreland12300a02019-08-02 13:27:15 -0700676aidl_interface {
677 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900678 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700679 srcs: [
680 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700681 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000682 backend: {
683 java: {
684 enabled: false,
685 },
686 },
Steven Moreland12300a02019-08-02 13:27:15 -0700687}
688
Steven Morelanddea3cf92019-07-16 18:06:55 -0700689cc_test {
690 name: "binderStabilityTest",
691 defaults: ["binder_test_defaults"],
692 srcs: [
693 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700694 ],
695
Steven Moreland13f84662020-07-23 21:30:41 +0000696 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700697 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700698 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700699 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700700 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700701 "libutils",
702 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700703 static_libs: [
704 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900705 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700706 ],
707
Steven Morelandea7659e2022-02-03 00:04:06 +0000708 test_suites: [
709 "device-tests",
710 "vts",
711 ],
Dan Shi302709b2019-09-19 15:28:15 -0700712 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700713}
Steven Moreland042ae822020-05-27 17:45:17 +0000714
715cc_test {
716 name: "binderAllocationLimits",
717 defaults: ["binder_test_defaults"],
718 srcs: ["binderAllocationLimits.cpp"],
719 shared_libs: [
720 "libbinder",
721 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000722 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000723 "libutils",
724 "libutilscallstack",
725 "libbase",
726 ],
727 test_suites: ["device-tests"],
728 require_root: true,
729}
Andy Hung73a14702020-11-24 13:04:46 -0800730
731cc_benchmark {
732 name: "binderParcelBenchmark",
733 defaults: ["binder_test_defaults"],
734 srcs: ["binderParcelBenchmark.cpp"],
735 shared_libs: [
736 "libbase",
737 "libbinder",
738 "liblog",
739 "libutils",
740 ],
741}
Yifan Hongaf766e62021-06-14 13:24:19 -0700742
743cc_test_host {
744 name: "binderUtilsHostTest",
745 defaults: ["binder_test_defaults"],
746 srcs: ["binderUtilsHostTest.cpp"],
747 shared_libs: [
748 "libbase",
749 "libbinder",
750 ],
751 static_libs: [
752 "libgmock",
753 ],
754 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700755 target: {
756 darwin: {
757 enabled: false,
758 },
759 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700760}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700761
762cc_test_host {
763 name: "binderHostDeviceTest",
764 defaults: ["binder_test_defaults"],
765 srcs: ["binderHostDeviceTest.cpp"],
766 test_config: "binderHostDeviceTest.xml",
767 shared_libs: [
768 "libbase",
769 "libbinder",
770 "liblog",
771 "libutils",
772 ],
773 static_libs: [
774 "libgmock",
775 ],
776 target_required: [
777 "binderHostDeviceTestService",
778 ],
779 test_suites: ["general-tests"],
780 target: {
781 darwin: {
782 enabled: false,
783 },
784 },
785 test_options: {
786 unit_test: false,
787 },
788}
789
790cc_test {
791 name: "binderHostDeviceTestService",
792 // The binary is named differently from the module so that PushFilePreparer pushes the binary
793 // directly, not the test module directory.
794 stem: "binderHostDeviceTest-service",
795 defaults: ["binder_test_defaults"],
796 gtest: false,
797 auto_gen_config: false,
798 srcs: ["binderHostDeviceTestService.cpp"],
799 shared_libs: [
800 "libbase",
801 "libbinder",
802 "liblog",
803 "libutils",
804 ],
805 test_suites: ["general-tests"],
806}
Pawanf00fabb2022-08-04 17:56:18 +0000807
808cc_defaults {
809 name: "service_fuzzer_defaults",
810 static_libs: [
811 "libbase",
812 "libbinder_random_parcel",
813 "libcutils",
814 ],
815 target: {
816 android: {
817 shared_libs: [
818 "libbinder_ndk",
819 "libbinder",
820 "libutils",
821 ],
822 },
823 host: {
824 static_libs: [
825 "libbinder_ndk",
826 "libbinder",
827 "libutils",
828 ],
829 },
830 darwin: {
831 enabled: false,
832 },
833 },
834 fuzz_config: {
835 cc: [
836 "smoreland@google.com",
837 "waghpawan@google.com",
838 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000839 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
840 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000841 },
842}