blob: cad364d8e8cce918739a8fc406983a8a5bdeebb3 [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 {
Steven Morelandc7a30c82019-07-10 13:12:23 -070035 name: "binderDriverInterfaceTest",
36 defaults: ["binder_test_defaults"],
Yifan Hong4e419d82021-04-26 11:32:56 -070037 header_libs: ["libbinder_headers"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070038 srcs: ["binderDriverInterfaceTest.cpp"],
Steven Morelandea7659e2022-02-03 00:04:06 +000039 test_suites: [
40 "device-tests",
41 "vts",
42 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -070043}
44
Steven Morelandcefba612020-11-05 22:57:06 +000045// unit test only, which can run on host and doesn't use /dev/binder
46cc_test {
Steven Moreland28318602021-06-25 01:16:29 +000047 name: "binderUnitTest",
Steven Morelandcefba612020-11-05 22:57:06 +000048 host_supported: true,
49 target: {
50 darwin: {
51 enabled: false,
52 },
53 },
Steven Morelandea7659e2022-02-03 00:04:06 +000054 srcs: [
55 "binderParcelUnitTest.cpp",
56 "binderBinderUnitTest.cpp",
Steven Morelandcf373692022-01-21 23:55:15 +000057 "binderStatusUnitTest.cpp",
Atneya Nair7ade4f42022-02-07 18:16:48 -050058 "binderMemoryHeapBaseUnitTest.cpp",
Fabián Cañas08bdc772023-01-02 15:02:56 -050059 "binderRecordedTransactionTest.cpp",
Steven Morelandea7659e2022-02-03 00:04:06 +000060 ],
Steven Morelandcefba612020-11-05 22:57:06 +000061 shared_libs: [
62 "libbinder",
Steven Morelandf80809b2021-10-07 18:09:20 -070063 "libcutils",
Steven Morelandcefba612020-11-05 22:57:06 +000064 "libutils",
65 ],
66 test_suites: ["general-tests"],
67}
68
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080069cc_test {
Steven Morelanda8244b92023-04-20 23:34:11 +000070 name: "binderRecordReplayTest",
71 srcs: ["binderRecordReplayTest.cpp"],
72 shared_libs: [
73 "libbinder",
74 "libcutils",
75 "libutils",
76 ],
77 static_libs: [
78 "binderRecordReplayTestIface-cpp",
79 ],
80 test_suites: ["general-tests"],
81}
82
83aidl_interface {
84 name: "binderRecordReplayTestIface",
85 unstable: true,
86 srcs: [
87 "IBinderRecordReplayTest.aidl",
88 ],
89}
90
91cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070092 name: "binderLibTest",
93 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080094
Dan Willemsen59e086f2016-07-25 17:13:45 -070095 srcs: ["binderLibTest.cpp"],
96 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -070097 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -070098 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -070099 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700100 "libutils",
101 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700102 static_libs: [
103 "libgmock",
104 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000105 test_suites: [
106 "device-tests",
107 "vts",
108 ],
Dan Shi80ada592019-09-13 09:17:17 -0700109 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700110}
111
Steven Moreland37aff182021-03-26 02:04:16 +0000112aidl_interface {
113 name: "binderRpcTestIface",
Andrei Homescud65666d2023-03-03 07:28:02 +0000114 vendor_available: true,
Steven Moreland37aff182021-03-26 02:04:16 +0000115 host_supported: true,
116 unstable: true,
117 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700118 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000119 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700120 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000121 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000122 "IBinderRpcSession.aidl",
123 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700124 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000125 ],
126 backend: {
127 java: {
128 enabled: false,
129 },
130 },
131}
132
Yifan Honge0e53282021-09-23 18:37:21 -0700133cc_library_static {
134 name: "libbinder_tls_test_utils",
135 host_supported: true,
Andrei Homescud65666d2023-03-03 07:28:02 +0000136 vendor_available: true,
Yifan Honge0e53282021-09-23 18:37:21 -0700137 target: {
138 darwin: {
139 enabled: false,
140 },
141 },
142 defaults: [
143 "binder_test_defaults",
144 "libbinder_tls_shared_deps",
145 ],
146 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700147 "libbase",
148 "liblog",
149 ],
150 static_libs: [
151 "libbinder_tls_static",
152 ],
153 srcs: [
154 "RpcTlsTestUtils.cpp",
155 ],
156 export_include_dirs: [
157 "include_tls_test_utils",
158 ],
159 visibility: [
160 ":__subpackages__",
161 ],
162}
163
Andrei Homescu12106de2022-04-27 04:42:21 +0000164cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000165 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000166 host_supported: true,
167 target: {
168 darwin: {
169 enabled: false,
170 },
171 },
Steven Moreland37aff182021-03-26 02:04:16 +0000172 defaults: [
173 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000174 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000175
Andrei Homescu12106de2022-04-27 04:42:21 +0000176 static_libs: [
177 "libbinder_tls_static",
178 "libbinder_tls_test_utils",
179 "binderRpcTestIface-cpp",
180 "binderRpcTestIface-ndk",
181 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000182}
183
184cc_defaults {
185 name: "binderRpcTest_service_defaults",
186 defaults: [
187 "binderRpcTest_common_defaults",
188 ],
189 gtest: false,
190 auto_gen_config: false,
191 srcs: [
192 "binderRpcTestCommon.cpp",
193 "binderRpcTestService.cpp",
194 ],
195}
196
197cc_defaults {
198 name: "binderRpcTest_defaults",
199 target: {
200 android: {
201 test_suites: ["vts"],
202 },
203 },
204 defaults: [
205 "binderRpcTest_common_defaults",
206 ],
207
208 srcs: [
209 "binderRpcTest.cpp",
210 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000211 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000212 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000213
Steven Moreland20531612023-04-04 18:03:24 +0000214 // This test uses a lot of resources and takes a long time. Due to
215 // design of several tests, it is also very sensitive to resource
216 // contention on the device. b/276820894
217 test_options: {
218 unit_test: false,
219 },
220
Andrei Homescu12106de2022-04-27 04:42:21 +0000221 test_suites: ["general-tests"],
222 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000223
224 data_bins: [
225 "binder_rpc_test_service",
226 "binder_rpc_test_service_no_kernel",
227 "binder_rpc_test_service_single_threaded",
228 "binder_rpc_test_service_single_threaded_no_kernel",
229 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000230}
231
Andrei Homescu2a298012022-06-15 01:08:54 +0000232cc_defaults {
233 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000234 cflags: [
235 "-DBINDER_WITH_KERNEL_IPC",
236 ],
237
Steven Moreland5553ac42020-11-11 02:14:45 +0000238 shared_libs: [
239 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000240 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000241 "libbase",
242 "libutils",
243 "libcutils",
244 "liblog",
245 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000246}
247
248cc_defaults {
249 name: "binderRpcTest_static_defaults",
250
251 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000252 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000253 "libutils",
254 // libcrypto_static is not visible to this module
255 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000256 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000257 static_libs: [
258 "libbase",
259 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000260 "libssl",
261 ],
262
263 cflags: [
264 // Disable tests that require shared libraries,
265 // e.g., libbinder.so or libbinder_ndk.so
266 "-DBINDER_TEST_NO_SHARED_LIBS",
267 ],
268}
269
270cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000271 // The module name cannot start with "binderRpcTest" because
272 // then atest tries to execute it as part of binderRpcTest
273 name: "binder_rpc_test_service",
274 defaults: [
275 "binderRpcTest_service_defaults",
276 "binderRpcTest_shared_defaults",
277 "libbinder_tls_shared_deps",
278 ],
279}
280
281cc_test {
282 name: "binder_rpc_test_service_no_kernel",
283 defaults: [
284 "binderRpcTest_service_defaults",
285 "binderRpcTest_static_defaults",
286 ],
287 static_libs: [
288 "libbinder_rpc_no_kernel",
289 ],
290}
291
292cc_test {
293 name: "binder_rpc_test_service_single_threaded",
294 defaults: [
295 "binderRpcTest_service_defaults",
296 "binderRpcTest_static_defaults",
297 ],
298 cflags: [
299 "-DBINDER_RPC_SINGLE_THREADED",
300 "-DBINDER_WITH_KERNEL_IPC",
301 ],
302 static_libs: [
303 "libbinder_rpc_single_threaded",
304 ],
305}
306
307cc_test {
308 name: "binder_rpc_test_service_single_threaded_no_kernel",
309 defaults: [
310 "binderRpcTest_service_defaults",
311 "binderRpcTest_static_defaults",
312 ],
313 cflags: [
314 "-DBINDER_RPC_SINGLE_THREADED",
315 ],
316 static_libs: [
317 "libbinder_rpc_single_threaded_no_kernel",
318 ],
319}
320
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000321cc_binary {
322 name: "binderRpcTestService_on_trusty_mock",
323 defaults: [
324 "trusty_mock_defaults",
325 ],
326
327 srcs: [
328 "binderRpcTestCommon.cpp",
329 "binderRpcTestServiceTrusty.cpp",
330 ],
331
332 shared_libs: [
333 "libbinder_on_trusty_mock",
334 "libbase",
335 "libutils",
336 "libcutils",
337 ],
338
339 static_libs: [
340 "binderRpcTestIface-cpp",
341 ],
342}
343
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000344cc_binary {
345 name: "binderRpcTest_on_trusty_mock",
346 defaults: [
347 "trusty_mock_defaults",
348 ],
349
350 srcs: [
351 "binderRpcUniversalTests.cpp",
352 "binderRpcTestCommon.cpp",
353 "binderRpcTestTrusty.cpp",
354 ],
355
356 shared_libs: [
357 "libbinder_on_trusty_mock",
358 "libbase",
359 "libutils",
360 "libcutils",
361 ],
362
363 static_libs: [
364 "binderRpcTestIface-cpp",
365 "libgtest",
366 ],
367}
368
Andrei Homescu2a298012022-06-15 01:08:54 +0000369cc_test {
370 name: "binderRpcTest",
371 defaults: [
372 "binderRpcTest_defaults",
373 "binderRpcTest_shared_defaults",
374 "libbinder_tls_shared_deps",
375 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000376
377 // Add the Trusty mock library as a fake dependency so it gets built
378 required: [
379 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000380 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000381 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000382 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000383}
384
385cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000386 name: "binderRpcTestNoKernel",
387 defaults: [
388 "binderRpcTest_defaults",
389 "binderRpcTest_static_defaults",
390 ],
391 static_libs: [
392 "libbinder_rpc_no_kernel",
393 ],
394}
395
396cc_test {
397 name: "binderRpcTestSingleThreaded",
398 defaults: [
399 "binderRpcTest_defaults",
400 "binderRpcTest_static_defaults",
401 ],
402 cflags: [
403 "-DBINDER_RPC_SINGLE_THREADED",
404 "-DBINDER_WITH_KERNEL_IPC",
405 ],
406 static_libs: [
407 "libbinder_rpc_single_threaded",
408 ],
409}
410
411cc_test {
412 name: "binderRpcTestSingleThreadedNoKernel",
413 defaults: [
414 "binderRpcTest_defaults",
415 "binderRpcTest_static_defaults",
416 ],
417 cflags: [
418 "-DBINDER_RPC_SINGLE_THREADED",
419 ],
420 static_libs: [
421 "libbinder_rpc_single_threaded_no_kernel",
422 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000423}
424
Yifan Hongff73aa92021-09-17 21:28:01 -0700425cc_test {
Andrei Homescud65666d2023-03-03 07:28:02 +0000426 name: "binderRpcToTrustyTest",
427 vendor: true,
428 host_supported: false,
429 defaults: [
430 "binderRpcTest_common_defaults",
431 "binderRpcTest_static_defaults",
432 ],
433
434 srcs: [
435 "binderRpcTest.cpp",
436 "binderRpcTestCommon.cpp",
437 "binderRpcUniversalTests.cpp",
438 ],
439
440 cflags: [
441 "-DBINDER_RPC_TO_TRUSTY_TEST",
442 ],
443
444 static_libs: [
445 // We want to link libbinder statically so we can push the binary
446 // to the device for testing independently of the library
447 "libbinder_rpc_no_kernel",
448 "libbinder_trusty",
449 "libtrusty",
450 ],
451
452 test_suites: ["device-tests"],
453 require_root: true,
454}
455
456cc_test {
Yifan Hongff73aa92021-09-17 21:28:01 -0700457 name: "RpcTlsUtilsTest",
458 host_supported: true,
459 target: {
460 darwin: {
461 enabled: false,
462 },
463 android: {
464 test_suites: ["vts"],
465 },
466 },
467 defaults: [
468 "binder_test_defaults",
469 "libbinder_tls_shared_deps",
470 ],
471 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700472 "RpcTlsUtilsTest.cpp",
473 ],
474 shared_libs: [
475 "libbinder",
476 "libbase",
477 "libutils",
478 "liblog",
479 ],
480 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700481 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700482 "libbinder_tls_static",
483 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000484 test_suites: [
485 "general-tests",
486 "device-tests",
487 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700488}
489
Steven Morelandcda60852021-04-14 23:45:32 +0000490cc_benchmark {
491 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700492 defaults: [
493 "binder_test_defaults",
494 "libbinder_tls_shared_deps",
495 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000496 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000497 target: {
498 darwin: {
499 enabled: false,
500 },
501 },
Steven Morelandcda60852021-04-14 23:45:32 +0000502 srcs: [
503 "binderRpcBenchmark.cpp",
504 "IBinderRpcBenchmark.aidl",
505 ],
506 shared_libs: [
507 "libbase",
508 "libbinder",
509 "liblog",
510 "libutils",
511 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700512 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700513 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700514 "libbinder_tls_static",
515 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000516}
517
Steven Moreland5553ac42020-11-11 02:14:45 +0000518cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700519 name: "binderRpcWireProtocolTest",
520 host_supported: true,
521 target: {
522 darwin: {
523 enabled: false,
524 },
525 android: {
526 test_suites: ["vts"],
527 },
528 },
529 defaults: [
530 "binder_test_defaults",
531 ],
532 srcs: [
533 "binderRpcWireProtocolTest.cpp",
534 ],
535 shared_libs: [
536 "libbinder",
537 "libbase",
538 "libutils",
539 "libcutils",
540 "liblog",
541 ],
542 test_suites: ["general-tests"],
543}
544
545cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700546 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700547 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700548 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700549 shared_libs: [
550 "libbinder",
551 "libutils",
552 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700553 cflags: [
554 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700555 "-Wno-missing-field-initializers",
556 "-Wno-sign-compare",
557 "-O3",
558 ],
559}
Wei Wang78f2a372016-10-20 23:18:17 -0700560
561cc_test {
562 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700563 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700564 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700565 shared_libs: [
566 "libbinder",
567 "libutils",
568 "libbase",
569 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700570 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700571}
Howard Chenc135dbc2017-03-25 17:12:59 +0800572
573cc_test {
574 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700575 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700576 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800577 shared_libs: [
578 "libbinder",
579 "libutils",
580 "libbase",
581 ],
582}
Dan Stozad630e522016-12-01 15:16:31 -0800583
584cc_test {
585 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700586 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700587 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800588
589 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800590 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800591 ],
592
593 cpp_std: "experimental",
594 gnu_extensions: false,
595
596 shared_libs: [
597 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700598 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800599 "liblog",
600 "libutils",
601 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000602 test_suites: [
603 "device-tests",
604 "vts",
605 ],
Dan Shi80ada592019-09-13 09:17:17 -0700606 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800607}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700608
Steven Morelandf23dae22020-10-27 19:34:55 +0000609cc_test {
610 name: "binderClearBufTest",
611 defaults: ["binder_test_defaults"],
612 srcs: [
613 "binderClearBufTest.cpp",
614 ],
615
616 shared_libs: [
617 "libbase",
618 "libbinder",
619 "liblog",
620 "libutils",
621 ],
622
623 test_suites: ["general-tests"],
624 require_root: true,
625}
626
Steven Moreland12300a02019-08-02 13:27:15 -0700627aidl_interface {
628 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900629 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700630 srcs: [
631 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700632 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000633 backend: {
634 java: {
635 enabled: false,
636 },
637 },
Steven Moreland12300a02019-08-02 13:27:15 -0700638}
639
Steven Morelanddea3cf92019-07-16 18:06:55 -0700640cc_test {
641 name: "binderStabilityTest",
642 defaults: ["binder_test_defaults"],
643 srcs: [
644 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700645 ],
646
Steven Moreland13f84662020-07-23 21:30:41 +0000647 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700648 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700649 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700650 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700651 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700652 "libutils",
653 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700654 static_libs: [
655 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900656 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700657 ],
658
Steven Morelandea7659e2022-02-03 00:04:06 +0000659 test_suites: [
660 "device-tests",
661 "vts",
662 ],
Dan Shi302709b2019-09-19 15:28:15 -0700663 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700664}
Steven Moreland042ae822020-05-27 17:45:17 +0000665
666cc_test {
667 name: "binderAllocationLimits",
668 defaults: ["binder_test_defaults"],
669 srcs: ["binderAllocationLimits.cpp"],
670 shared_libs: [
671 "libbinder",
672 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000673 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000674 "libutils",
675 "libutilscallstack",
676 "libbase",
677 ],
678 test_suites: ["device-tests"],
679 require_root: true,
680}
Andy Hung73a14702020-11-24 13:04:46 -0800681
682cc_benchmark {
683 name: "binderParcelBenchmark",
684 defaults: ["binder_test_defaults"],
685 srcs: ["binderParcelBenchmark.cpp"],
686 shared_libs: [
687 "libbase",
688 "libbinder",
689 "liblog",
690 "libutils",
691 ],
692}
Yifan Hongaf766e62021-06-14 13:24:19 -0700693
694cc_test_host {
695 name: "binderUtilsHostTest",
696 defaults: ["binder_test_defaults"],
697 srcs: ["binderUtilsHostTest.cpp"],
698 shared_libs: [
699 "libbase",
700 "libbinder",
701 ],
702 static_libs: [
703 "libgmock",
704 ],
705 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700706 target: {
707 darwin: {
708 enabled: false,
709 },
710 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700711}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700712
713cc_test_host {
714 name: "binderHostDeviceTest",
715 defaults: ["binder_test_defaults"],
716 srcs: ["binderHostDeviceTest.cpp"],
717 test_config: "binderHostDeviceTest.xml",
718 shared_libs: [
719 "libbase",
720 "libbinder",
721 "liblog",
722 "libutils",
723 ],
724 static_libs: [
725 "libgmock",
726 ],
727 target_required: [
728 "binderHostDeviceTestService",
729 ],
730 test_suites: ["general-tests"],
731 target: {
732 darwin: {
733 enabled: false,
734 },
735 },
736 test_options: {
737 unit_test: false,
738 },
739}
740
741cc_test {
742 name: "binderHostDeviceTestService",
743 // The binary is named differently from the module so that PushFilePreparer pushes the binary
744 // directly, not the test module directory.
745 stem: "binderHostDeviceTest-service",
746 defaults: ["binder_test_defaults"],
747 gtest: false,
748 auto_gen_config: false,
749 srcs: ["binderHostDeviceTestService.cpp"],
750 shared_libs: [
751 "libbase",
752 "libbinder",
753 "liblog",
754 "libutils",
755 ],
756 test_suites: ["general-tests"],
757}
Pawanf00fabb2022-08-04 17:56:18 +0000758
759cc_defaults {
760 name: "service_fuzzer_defaults",
761 static_libs: [
762 "libbase",
763 "libbinder_random_parcel",
764 "libcutils",
765 ],
766 target: {
767 android: {
768 shared_libs: [
769 "libbinder_ndk",
770 "libbinder",
771 "libutils",
772 ],
773 },
774 host: {
775 static_libs: [
776 "libbinder_ndk",
777 "libbinder",
778 "libutils",
779 ],
780 },
781 darwin: {
782 enabled: false,
783 },
784 },
785 fuzz_config: {
786 cc: [
787 "smoreland@google.com",
788 "waghpawan@google.com",
789 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000790 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
791 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000792 },
793}