blob: 0280c9668938e1f6e92855ec8ce0fa765b76b3d3 [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"],
Steven Moreland4ed688d2023-05-03 23:03:56 +000081 require_root: true,
Steven Morelanda8244b92023-04-20 23:34:11 +000082}
83
84aidl_interface {
85 name: "binderRecordReplayTestIface",
86 unstable: true,
87 srcs: [
88 "IBinderRecordReplayTest.aidl",
89 ],
90}
91
92cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070093 name: "binderLibTest",
94 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080095
Dan Willemsen59e086f2016-07-25 17:13:45 -070096 srcs: ["binderLibTest.cpp"],
97 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -070098 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -070099 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -0700100 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700101 "libutils",
102 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700103 static_libs: [
104 "libgmock",
105 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000106 test_suites: [
107 "device-tests",
108 "vts",
109 ],
Dan Shi80ada592019-09-13 09:17:17 -0700110 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700111}
112
Steven Moreland37aff182021-03-26 02:04:16 +0000113aidl_interface {
114 name: "binderRpcTestIface",
Andrei Homescud65666d2023-03-03 07:28:02 +0000115 vendor_available: true,
Steven Moreland37aff182021-03-26 02:04:16 +0000116 host_supported: true,
117 unstable: true,
118 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700119 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000120 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700121 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000122 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000123 "IBinderRpcSession.aidl",
124 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700125 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000126 ],
127 backend: {
128 java: {
129 enabled: false,
130 },
131 },
132}
133
Yifan Honge0e53282021-09-23 18:37:21 -0700134cc_library_static {
135 name: "libbinder_tls_test_utils",
136 host_supported: true,
Andrei Homescud65666d2023-03-03 07:28:02 +0000137 vendor_available: true,
Yifan Honge0e53282021-09-23 18:37:21 -0700138 target: {
139 darwin: {
140 enabled: false,
141 },
142 },
143 defaults: [
144 "binder_test_defaults",
145 "libbinder_tls_shared_deps",
146 ],
147 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700148 "libbase",
149 "liblog",
150 ],
151 static_libs: [
152 "libbinder_tls_static",
153 ],
154 srcs: [
155 "RpcTlsTestUtils.cpp",
156 ],
157 export_include_dirs: [
158 "include_tls_test_utils",
159 ],
160 visibility: [
161 ":__subpackages__",
162 ],
163}
164
Andrei Homescu12106de2022-04-27 04:42:21 +0000165cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000166 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000167 host_supported: true,
168 target: {
169 darwin: {
170 enabled: false,
171 },
172 },
Steven Moreland37aff182021-03-26 02:04:16 +0000173 defaults: [
174 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000175 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000176
Andrei Homescu12106de2022-04-27 04:42:21 +0000177 static_libs: [
178 "libbinder_tls_static",
179 "libbinder_tls_test_utils",
180 "binderRpcTestIface-cpp",
181 "binderRpcTestIface-ndk",
182 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000183}
184
185cc_defaults {
186 name: "binderRpcTest_service_defaults",
187 defaults: [
188 "binderRpcTest_common_defaults",
189 ],
190 gtest: false,
191 auto_gen_config: false,
192 srcs: [
193 "binderRpcTestCommon.cpp",
194 "binderRpcTestService.cpp",
195 ],
196}
197
198cc_defaults {
199 name: "binderRpcTest_defaults",
200 target: {
201 android: {
202 test_suites: ["vts"],
203 },
204 },
205 defaults: [
206 "binderRpcTest_common_defaults",
207 ],
208
209 srcs: [
210 "binderRpcTest.cpp",
211 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000212 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000213 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000214
Steven Moreland20531612023-04-04 18:03:24 +0000215 // This test uses a lot of resources and takes a long time. Due to
216 // design of several tests, it is also very sensitive to resource
217 // contention on the device. b/276820894
218 test_options: {
219 unit_test: false,
220 },
221
Andrei Homescu12106de2022-04-27 04:42:21 +0000222 test_suites: ["general-tests"],
223 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000224
225 data_bins: [
226 "binder_rpc_test_service",
227 "binder_rpc_test_service_no_kernel",
228 "binder_rpc_test_service_single_threaded",
229 "binder_rpc_test_service_single_threaded_no_kernel",
230 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000231}
232
Andrei Homescu2a298012022-06-15 01:08:54 +0000233cc_defaults {
234 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000235 cflags: [
236 "-DBINDER_WITH_KERNEL_IPC",
237 ],
238
Steven Moreland5553ac42020-11-11 02:14:45 +0000239 shared_libs: [
240 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000241 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000242 "libbase",
243 "libutils",
244 "libcutils",
245 "liblog",
246 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000247}
248
249cc_defaults {
250 name: "binderRpcTest_static_defaults",
251
252 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000253 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000254 "libutils",
255 // libcrypto_static is not visible to this module
256 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000257 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000258 static_libs: [
259 "libbase",
260 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000261 "libssl",
262 ],
263
264 cflags: [
265 // Disable tests that require shared libraries,
266 // e.g., libbinder.so or libbinder_ndk.so
267 "-DBINDER_TEST_NO_SHARED_LIBS",
268 ],
269}
270
271cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000272 // The module name cannot start with "binderRpcTest" because
273 // then atest tries to execute it as part of binderRpcTest
274 name: "binder_rpc_test_service",
275 defaults: [
276 "binderRpcTest_service_defaults",
277 "binderRpcTest_shared_defaults",
278 "libbinder_tls_shared_deps",
279 ],
280}
281
282cc_test {
283 name: "binder_rpc_test_service_no_kernel",
284 defaults: [
285 "binderRpcTest_service_defaults",
286 "binderRpcTest_static_defaults",
287 ],
288 static_libs: [
289 "libbinder_rpc_no_kernel",
290 ],
291}
292
293cc_test {
294 name: "binder_rpc_test_service_single_threaded",
295 defaults: [
296 "binderRpcTest_service_defaults",
297 "binderRpcTest_static_defaults",
298 ],
299 cflags: [
300 "-DBINDER_RPC_SINGLE_THREADED",
301 "-DBINDER_WITH_KERNEL_IPC",
302 ],
303 static_libs: [
304 "libbinder_rpc_single_threaded",
305 ],
306}
307
308cc_test {
309 name: "binder_rpc_test_service_single_threaded_no_kernel",
310 defaults: [
311 "binderRpcTest_service_defaults",
312 "binderRpcTest_static_defaults",
313 ],
314 cflags: [
315 "-DBINDER_RPC_SINGLE_THREADED",
316 ],
317 static_libs: [
318 "libbinder_rpc_single_threaded_no_kernel",
319 ],
320}
321
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000322cc_binary {
323 name: "binderRpcTestService_on_trusty_mock",
324 defaults: [
325 "trusty_mock_defaults",
326 ],
327
328 srcs: [
329 "binderRpcTestCommon.cpp",
330 "binderRpcTestServiceTrusty.cpp",
331 ],
332
333 shared_libs: [
334 "libbinder_on_trusty_mock",
335 "libbase",
336 "libutils",
337 "libcutils",
338 ],
339
340 static_libs: [
341 "binderRpcTestIface-cpp",
342 ],
343}
344
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000345cc_binary {
346 name: "binderRpcTest_on_trusty_mock",
347 defaults: [
348 "trusty_mock_defaults",
349 ],
350
351 srcs: [
352 "binderRpcUniversalTests.cpp",
353 "binderRpcTestCommon.cpp",
354 "binderRpcTestTrusty.cpp",
355 ],
356
357 shared_libs: [
358 "libbinder_on_trusty_mock",
359 "libbase",
360 "libutils",
361 "libcutils",
362 ],
363
364 static_libs: [
365 "binderRpcTestIface-cpp",
366 "libgtest",
367 ],
368}
369
Andrei Homescu2a298012022-06-15 01:08:54 +0000370cc_test {
371 name: "binderRpcTest",
372 defaults: [
373 "binderRpcTest_defaults",
374 "binderRpcTest_shared_defaults",
375 "libbinder_tls_shared_deps",
376 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000377
378 // Add the Trusty mock library as a fake dependency so it gets built
379 required: [
380 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000381 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000382 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000383 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000384}
385
386cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000387 name: "binderRpcTestNoKernel",
388 defaults: [
389 "binderRpcTest_defaults",
390 "binderRpcTest_static_defaults",
391 ],
392 static_libs: [
393 "libbinder_rpc_no_kernel",
394 ],
395}
396
397cc_test {
398 name: "binderRpcTestSingleThreaded",
399 defaults: [
400 "binderRpcTest_defaults",
401 "binderRpcTest_static_defaults",
402 ],
403 cflags: [
404 "-DBINDER_RPC_SINGLE_THREADED",
405 "-DBINDER_WITH_KERNEL_IPC",
406 ],
407 static_libs: [
408 "libbinder_rpc_single_threaded",
409 ],
410}
411
412cc_test {
413 name: "binderRpcTestSingleThreadedNoKernel",
414 defaults: [
415 "binderRpcTest_defaults",
416 "binderRpcTest_static_defaults",
417 ],
418 cflags: [
419 "-DBINDER_RPC_SINGLE_THREADED",
420 ],
421 static_libs: [
422 "libbinder_rpc_single_threaded_no_kernel",
423 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000424}
425
Yifan Hongff73aa92021-09-17 21:28:01 -0700426cc_test {
Andrei Homescud65666d2023-03-03 07:28:02 +0000427 name: "binderRpcToTrustyTest",
428 vendor: true,
429 host_supported: false,
430 defaults: [
431 "binderRpcTest_common_defaults",
432 "binderRpcTest_static_defaults",
433 ],
434
435 srcs: [
436 "binderRpcTest.cpp",
437 "binderRpcTestCommon.cpp",
438 "binderRpcUniversalTests.cpp",
439 ],
440
441 cflags: [
442 "-DBINDER_RPC_TO_TRUSTY_TEST",
443 ],
444
445 static_libs: [
446 // We want to link libbinder statically so we can push the binary
447 // to the device for testing independently of the library
448 "libbinder_rpc_no_kernel",
449 "libbinder_trusty",
450 "libtrusty",
451 ],
452
453 test_suites: ["device-tests"],
454 require_root: true,
455}
456
457cc_test {
Yifan Hongff73aa92021-09-17 21:28:01 -0700458 name: "RpcTlsUtilsTest",
459 host_supported: true,
460 target: {
461 darwin: {
462 enabled: false,
463 },
464 android: {
465 test_suites: ["vts"],
466 },
467 },
468 defaults: [
469 "binder_test_defaults",
470 "libbinder_tls_shared_deps",
471 ],
472 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700473 "RpcTlsUtilsTest.cpp",
474 ],
475 shared_libs: [
476 "libbinder",
477 "libbase",
478 "libutils",
479 "liblog",
480 ],
481 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700482 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700483 "libbinder_tls_static",
484 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000485 test_suites: [
486 "general-tests",
487 "device-tests",
488 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700489}
490
Steven Morelandcda60852021-04-14 23:45:32 +0000491cc_benchmark {
492 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700493 defaults: [
494 "binder_test_defaults",
495 "libbinder_tls_shared_deps",
496 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000497 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000498 target: {
499 darwin: {
500 enabled: false,
501 },
502 },
Steven Morelandcda60852021-04-14 23:45:32 +0000503 srcs: [
504 "binderRpcBenchmark.cpp",
505 "IBinderRpcBenchmark.aidl",
506 ],
507 shared_libs: [
508 "libbase",
509 "libbinder",
510 "liblog",
511 "libutils",
512 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700513 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700514 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700515 "libbinder_tls_static",
516 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000517}
518
Steven Moreland5553ac42020-11-11 02:14:45 +0000519cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700520 name: "binderRpcWireProtocolTest",
521 host_supported: true,
522 target: {
523 darwin: {
524 enabled: false,
525 },
526 android: {
527 test_suites: ["vts"],
528 },
529 },
530 defaults: [
531 "binder_test_defaults",
532 ],
533 srcs: [
534 "binderRpcWireProtocolTest.cpp",
535 ],
536 shared_libs: [
537 "libbinder",
538 "libbase",
539 "libutils",
540 "libcutils",
541 "liblog",
542 ],
543 test_suites: ["general-tests"],
544}
545
546cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700547 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700548 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700549 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700550 shared_libs: [
551 "libbinder",
552 "libutils",
553 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700554 cflags: [
555 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700556 "-Wno-missing-field-initializers",
557 "-Wno-sign-compare",
558 "-O3",
559 ],
560}
Wei Wang78f2a372016-10-20 23:18:17 -0700561
562cc_test {
563 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700564 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700565 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700566 shared_libs: [
567 "libbinder",
568 "libutils",
569 "libbase",
570 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700571 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700572}
Howard Chenc135dbc2017-03-25 17:12:59 +0800573
574cc_test {
575 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700576 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700577 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800578 shared_libs: [
579 "libbinder",
580 "libutils",
581 "libbase",
582 ],
583}
Dan Stozad630e522016-12-01 15:16:31 -0800584
585cc_test {
586 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700587 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700588 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800589
590 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800591 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800592 ],
593
594 cpp_std: "experimental",
595 gnu_extensions: false,
596
597 shared_libs: [
598 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700599 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800600 "liblog",
601 "libutils",
602 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000603 test_suites: [
604 "device-tests",
605 "vts",
606 ],
Dan Shi80ada592019-09-13 09:17:17 -0700607 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800608}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700609
Steven Morelandf23dae22020-10-27 19:34:55 +0000610cc_test {
611 name: "binderClearBufTest",
612 defaults: ["binder_test_defaults"],
613 srcs: [
614 "binderClearBufTest.cpp",
615 ],
616
617 shared_libs: [
618 "libbase",
619 "libbinder",
620 "liblog",
621 "libutils",
622 ],
623
624 test_suites: ["general-tests"],
625 require_root: true,
626}
627
Steven Moreland12300a02019-08-02 13:27:15 -0700628aidl_interface {
629 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900630 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700631 srcs: [
632 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700633 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000634 backend: {
635 java: {
636 enabled: false,
637 },
638 },
Steven Moreland12300a02019-08-02 13:27:15 -0700639}
640
Steven Morelanddea3cf92019-07-16 18:06:55 -0700641cc_test {
642 name: "binderStabilityTest",
643 defaults: ["binder_test_defaults"],
644 srcs: [
645 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700646 ],
647
Steven Moreland13f84662020-07-23 21:30:41 +0000648 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700649 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700650 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700651 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700652 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700653 "libutils",
654 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700655 static_libs: [
656 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900657 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700658 ],
659
Steven Morelandea7659e2022-02-03 00:04:06 +0000660 test_suites: [
661 "device-tests",
662 "vts",
663 ],
Dan Shi302709b2019-09-19 15:28:15 -0700664 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700665}
Steven Moreland042ae822020-05-27 17:45:17 +0000666
667cc_test {
668 name: "binderAllocationLimits",
669 defaults: ["binder_test_defaults"],
670 srcs: ["binderAllocationLimits.cpp"],
671 shared_libs: [
672 "libbinder",
673 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000674 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000675 "libutils",
676 "libutilscallstack",
677 "libbase",
678 ],
679 test_suites: ["device-tests"],
680 require_root: true,
681}
Andy Hung73a14702020-11-24 13:04:46 -0800682
683cc_benchmark {
684 name: "binderParcelBenchmark",
685 defaults: ["binder_test_defaults"],
686 srcs: ["binderParcelBenchmark.cpp"],
687 shared_libs: [
688 "libbase",
689 "libbinder",
690 "liblog",
691 "libutils",
692 ],
693}
Yifan Hongaf766e62021-06-14 13:24:19 -0700694
695cc_test_host {
696 name: "binderUtilsHostTest",
697 defaults: ["binder_test_defaults"],
698 srcs: ["binderUtilsHostTest.cpp"],
699 shared_libs: [
700 "libbase",
701 "libbinder",
702 ],
703 static_libs: [
704 "libgmock",
705 ],
706 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700707 target: {
708 darwin: {
709 enabled: false,
710 },
711 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700712}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700713
714cc_test_host {
715 name: "binderHostDeviceTest",
716 defaults: ["binder_test_defaults"],
717 srcs: ["binderHostDeviceTest.cpp"],
718 test_config: "binderHostDeviceTest.xml",
719 shared_libs: [
720 "libbase",
721 "libbinder",
722 "liblog",
723 "libutils",
724 ],
725 static_libs: [
726 "libgmock",
727 ],
728 target_required: [
729 "binderHostDeviceTestService",
730 ],
731 test_suites: ["general-tests"],
732 target: {
733 darwin: {
734 enabled: false,
735 },
736 },
737 test_options: {
738 unit_test: false,
739 },
740}
741
742cc_test {
743 name: "binderHostDeviceTestService",
744 // The binary is named differently from the module so that PushFilePreparer pushes the binary
745 // directly, not the test module directory.
746 stem: "binderHostDeviceTest-service",
747 defaults: ["binder_test_defaults"],
748 gtest: false,
749 auto_gen_config: false,
750 srcs: ["binderHostDeviceTestService.cpp"],
751 shared_libs: [
752 "libbase",
753 "libbinder",
754 "liblog",
755 "libutils",
756 ],
757 test_suites: ["general-tests"],
758}
Pawanf00fabb2022-08-04 17:56:18 +0000759
760cc_defaults {
761 name: "service_fuzzer_defaults",
762 static_libs: [
763 "libbase",
764 "libbinder_random_parcel",
765 "libcutils",
766 ],
767 target: {
768 android: {
769 shared_libs: [
770 "libbinder_ndk",
771 "libbinder",
772 "libutils",
773 ],
774 },
775 host: {
776 static_libs: [
777 "libbinder_ndk",
778 "libbinder",
779 "libutils",
780 ],
781 },
782 darwin: {
783 enabled: false,
784 },
785 },
786 fuzz_config: {
787 cc: [
788 "smoreland@google.com",
789 "waghpawan@google.com",
790 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000791 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
792 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000793 },
794}