blob: 873e9550f95e2b78cfcbc92c7c112c6548999f4a [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
Steven Moreland20531612023-04-04 18:03:24 +0000241 // This test uses a lot of resources and takes a long time. Due to
242 // design of several tests, it is also very sensitive to resource
243 // contention on the device. b/276820894
244 test_options: {
245 unit_test: false,
246 },
247
Andrei Homescu12106de2022-04-27 04:42:21 +0000248 test_suites: ["general-tests"],
249 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000250
251 data_bins: [
252 "binder_rpc_test_service",
253 "binder_rpc_test_service_no_kernel",
254 "binder_rpc_test_service_single_threaded",
255 "binder_rpc_test_service_single_threaded_no_kernel",
256 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000257}
258
Andrei Homescu2a298012022-06-15 01:08:54 +0000259cc_defaults {
260 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000261 cflags: [
262 "-DBINDER_WITH_KERNEL_IPC",
263 ],
264
Steven Moreland5553ac42020-11-11 02:14:45 +0000265 shared_libs: [
266 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000267 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000268 "libbase",
269 "libutils",
270 "libcutils",
271 "liblog",
272 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000273}
274
275cc_defaults {
276 name: "binderRpcTest_static_defaults",
277
278 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000279 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000280 "libutils",
281 // libcrypto_static is not visible to this module
282 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000283 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000284 static_libs: [
285 "libbase",
286 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000287 "libssl",
288 ],
289
290 cflags: [
291 // Disable tests that require shared libraries,
292 // e.g., libbinder.so or libbinder_ndk.so
293 "-DBINDER_TEST_NO_SHARED_LIBS",
294 ],
295}
296
297cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000298 // The module name cannot start with "binderRpcTest" because
299 // then atest tries to execute it as part of binderRpcTest
300 name: "binder_rpc_test_service",
301 defaults: [
302 "binderRpcTest_service_defaults",
303 "binderRpcTest_shared_defaults",
304 "libbinder_tls_shared_deps",
305 ],
306}
307
308cc_test {
309 name: "binder_rpc_test_service_no_kernel",
310 defaults: [
311 "binderRpcTest_service_defaults",
312 "binderRpcTest_static_defaults",
313 ],
314 static_libs: [
315 "libbinder_rpc_no_kernel",
316 ],
317}
318
319cc_test {
320 name: "binder_rpc_test_service_single_threaded",
321 defaults: [
322 "binderRpcTest_service_defaults",
323 "binderRpcTest_static_defaults",
324 ],
325 cflags: [
326 "-DBINDER_RPC_SINGLE_THREADED",
327 "-DBINDER_WITH_KERNEL_IPC",
328 ],
329 static_libs: [
330 "libbinder_rpc_single_threaded",
331 ],
332}
333
334cc_test {
335 name: "binder_rpc_test_service_single_threaded_no_kernel",
336 defaults: [
337 "binderRpcTest_service_defaults",
338 "binderRpcTest_static_defaults",
339 ],
340 cflags: [
341 "-DBINDER_RPC_SINGLE_THREADED",
342 ],
343 static_libs: [
344 "libbinder_rpc_single_threaded_no_kernel",
345 ],
346}
347
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000348cc_binary {
349 name: "binderRpcTestService_on_trusty_mock",
350 defaults: [
351 "trusty_mock_defaults",
352 ],
353
354 srcs: [
355 "binderRpcTestCommon.cpp",
356 "binderRpcTestServiceTrusty.cpp",
357 ],
358
359 shared_libs: [
360 "libbinder_on_trusty_mock",
361 "libbase",
362 "libutils",
363 "libcutils",
364 ],
365
366 static_libs: [
367 "binderRpcTestIface-cpp",
368 ],
369}
370
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000371cc_binary {
372 name: "binderRpcTest_on_trusty_mock",
373 defaults: [
374 "trusty_mock_defaults",
375 ],
376
377 srcs: [
378 "binderRpcUniversalTests.cpp",
379 "binderRpcTestCommon.cpp",
380 "binderRpcTestTrusty.cpp",
381 ],
382
383 shared_libs: [
384 "libbinder_on_trusty_mock",
385 "libbase",
386 "libutils",
387 "libcutils",
388 ],
389
390 static_libs: [
391 "binderRpcTestIface-cpp",
392 "libgtest",
393 ],
394}
395
Andrei Homescu2a298012022-06-15 01:08:54 +0000396cc_test {
397 name: "binderRpcTest",
398 defaults: [
399 "binderRpcTest_defaults",
400 "binderRpcTest_shared_defaults",
401 "libbinder_tls_shared_deps",
402 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000403
404 // Add the Trusty mock library as a fake dependency so it gets built
405 required: [
406 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000407 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000408 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000409 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000410}
411
412cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000413 name: "binderRpcTestNoKernel",
414 defaults: [
415 "binderRpcTest_defaults",
416 "binderRpcTest_static_defaults",
417 ],
418 static_libs: [
419 "libbinder_rpc_no_kernel",
420 ],
421}
422
423cc_test {
424 name: "binderRpcTestSingleThreaded",
425 defaults: [
426 "binderRpcTest_defaults",
427 "binderRpcTest_static_defaults",
428 ],
429 cflags: [
430 "-DBINDER_RPC_SINGLE_THREADED",
431 "-DBINDER_WITH_KERNEL_IPC",
432 ],
433 static_libs: [
434 "libbinder_rpc_single_threaded",
435 ],
436}
437
438cc_test {
439 name: "binderRpcTestSingleThreadedNoKernel",
440 defaults: [
441 "binderRpcTest_defaults",
442 "binderRpcTest_static_defaults",
443 ],
444 cflags: [
445 "-DBINDER_RPC_SINGLE_THREADED",
446 ],
447 static_libs: [
448 "libbinder_rpc_single_threaded_no_kernel",
449 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000450}
451
Yifan Hongff73aa92021-09-17 21:28:01 -0700452cc_test {
Andrei Homescud65666d2023-03-03 07:28:02 +0000453 name: "binderRpcToTrustyTest",
454 vendor: true,
455 host_supported: false,
456 defaults: [
457 "binderRpcTest_common_defaults",
458 "binderRpcTest_static_defaults",
459 ],
460
461 srcs: [
462 "binderRpcTest.cpp",
463 "binderRpcTestCommon.cpp",
464 "binderRpcUniversalTests.cpp",
465 ],
466
467 cflags: [
468 "-DBINDER_RPC_TO_TRUSTY_TEST",
469 ],
470
471 static_libs: [
472 // We want to link libbinder statically so we can push the binary
473 // to the device for testing independently of the library
474 "libbinder_rpc_no_kernel",
475 "libbinder_trusty",
476 "libtrusty",
477 ],
478
479 test_suites: ["device-tests"],
480 require_root: true,
481}
482
483cc_test {
Yifan Hongff73aa92021-09-17 21:28:01 -0700484 name: "RpcTlsUtilsTest",
485 host_supported: true,
486 target: {
487 darwin: {
488 enabled: false,
489 },
490 android: {
491 test_suites: ["vts"],
492 },
493 },
494 defaults: [
495 "binder_test_defaults",
496 "libbinder_tls_shared_deps",
497 ],
498 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700499 "RpcTlsUtilsTest.cpp",
500 ],
501 shared_libs: [
502 "libbinder",
503 "libbase",
504 "libutils",
505 "liblog",
506 ],
507 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700508 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700509 "libbinder_tls_static",
510 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000511 test_suites: [
512 "general-tests",
513 "device-tests",
514 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700515}
516
Steven Morelandcda60852021-04-14 23:45:32 +0000517cc_benchmark {
518 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700519 defaults: [
520 "binder_test_defaults",
521 "libbinder_tls_shared_deps",
522 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000523 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000524 target: {
525 darwin: {
526 enabled: false,
527 },
528 },
Steven Morelandcda60852021-04-14 23:45:32 +0000529 srcs: [
530 "binderRpcBenchmark.cpp",
531 "IBinderRpcBenchmark.aidl",
532 ],
533 shared_libs: [
534 "libbase",
535 "libbinder",
536 "liblog",
537 "libutils",
538 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700539 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700540 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700541 "libbinder_tls_static",
542 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000543}
544
Steven Moreland5553ac42020-11-11 02:14:45 +0000545cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700546 name: "binderRpcWireProtocolTest",
547 host_supported: true,
548 target: {
549 darwin: {
550 enabled: false,
551 },
552 android: {
553 test_suites: ["vts"],
554 },
555 },
556 defaults: [
557 "binder_test_defaults",
558 ],
559 srcs: [
560 "binderRpcWireProtocolTest.cpp",
561 ],
562 shared_libs: [
563 "libbinder",
564 "libbase",
565 "libutils",
566 "libcutils",
567 "liblog",
568 ],
569 test_suites: ["general-tests"],
570}
571
572cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700573 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700574 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700575 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700576 shared_libs: [
577 "libbinder",
578 "libutils",
579 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700580 cflags: [
581 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700582 "-Wno-missing-field-initializers",
583 "-Wno-sign-compare",
584 "-O3",
585 ],
586}
Wei Wang78f2a372016-10-20 23:18:17 -0700587
588cc_test {
589 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700590 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700591 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700592 shared_libs: [
593 "libbinder",
594 "libutils",
595 "libbase",
596 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700597 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700598}
Howard Chenc135dbc2017-03-25 17:12:59 +0800599
600cc_test {
601 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700602 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700603 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800604 shared_libs: [
605 "libbinder",
606 "libutils",
607 "libbase",
608 ],
609}
Dan Stozad630e522016-12-01 15:16:31 -0800610
611cc_test {
612 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700613 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700614 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800615
616 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800617 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800618 ],
619
620 cpp_std: "experimental",
621 gnu_extensions: false,
622
623 shared_libs: [
624 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700625 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800626 "liblog",
627 "libutils",
628 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000629 test_suites: [
630 "device-tests",
631 "vts",
632 ],
Dan Shi80ada592019-09-13 09:17:17 -0700633 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800634}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700635
Steven Morelandf23dae22020-10-27 19:34:55 +0000636cc_test {
637 name: "binderClearBufTest",
638 defaults: ["binder_test_defaults"],
639 srcs: [
640 "binderClearBufTest.cpp",
641 ],
642
643 shared_libs: [
644 "libbase",
645 "libbinder",
646 "liblog",
647 "libutils",
648 ],
649
650 test_suites: ["general-tests"],
651 require_root: true,
652}
653
Steven Moreland12300a02019-08-02 13:27:15 -0700654aidl_interface {
655 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900656 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700657 srcs: [
658 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700659 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000660 backend: {
661 java: {
662 enabled: false,
663 },
664 },
Steven Moreland12300a02019-08-02 13:27:15 -0700665}
666
Steven Morelanddea3cf92019-07-16 18:06:55 -0700667cc_test {
668 name: "binderStabilityTest",
669 defaults: ["binder_test_defaults"],
670 srcs: [
671 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700672 ],
673
Steven Moreland13f84662020-07-23 21:30:41 +0000674 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700675 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700676 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700677 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700678 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700679 "libutils",
680 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700681 static_libs: [
682 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900683 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700684 ],
685
Steven Morelandea7659e2022-02-03 00:04:06 +0000686 test_suites: [
687 "device-tests",
688 "vts",
689 ],
Dan Shi302709b2019-09-19 15:28:15 -0700690 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700691}
Steven Moreland042ae822020-05-27 17:45:17 +0000692
693cc_test {
694 name: "binderAllocationLimits",
695 defaults: ["binder_test_defaults"],
696 srcs: ["binderAllocationLimits.cpp"],
697 shared_libs: [
698 "libbinder",
699 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000700 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000701 "libutils",
702 "libutilscallstack",
703 "libbase",
704 ],
705 test_suites: ["device-tests"],
706 require_root: true,
707}
Andy Hung73a14702020-11-24 13:04:46 -0800708
709cc_benchmark {
710 name: "binderParcelBenchmark",
711 defaults: ["binder_test_defaults"],
712 srcs: ["binderParcelBenchmark.cpp"],
713 shared_libs: [
714 "libbase",
715 "libbinder",
716 "liblog",
717 "libutils",
718 ],
719}
Yifan Hongaf766e62021-06-14 13:24:19 -0700720
721cc_test_host {
722 name: "binderUtilsHostTest",
723 defaults: ["binder_test_defaults"],
724 srcs: ["binderUtilsHostTest.cpp"],
725 shared_libs: [
726 "libbase",
727 "libbinder",
728 ],
729 static_libs: [
730 "libgmock",
731 ],
732 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700733 target: {
734 darwin: {
735 enabled: false,
736 },
737 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700738}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700739
740cc_test_host {
741 name: "binderHostDeviceTest",
742 defaults: ["binder_test_defaults"],
743 srcs: ["binderHostDeviceTest.cpp"],
744 test_config: "binderHostDeviceTest.xml",
745 shared_libs: [
746 "libbase",
747 "libbinder",
748 "liblog",
749 "libutils",
750 ],
751 static_libs: [
752 "libgmock",
753 ],
754 target_required: [
755 "binderHostDeviceTestService",
756 ],
757 test_suites: ["general-tests"],
758 target: {
759 darwin: {
760 enabled: false,
761 },
762 },
763 test_options: {
764 unit_test: false,
765 },
766}
767
768cc_test {
769 name: "binderHostDeviceTestService",
770 // The binary is named differently from the module so that PushFilePreparer pushes the binary
771 // directly, not the test module directory.
772 stem: "binderHostDeviceTest-service",
773 defaults: ["binder_test_defaults"],
774 gtest: false,
775 auto_gen_config: false,
776 srcs: ["binderHostDeviceTestService.cpp"],
777 shared_libs: [
778 "libbase",
779 "libbinder",
780 "liblog",
781 "libutils",
782 ],
783 test_suites: ["general-tests"],
784}
Pawanf00fabb2022-08-04 17:56:18 +0000785
786cc_defaults {
787 name: "service_fuzzer_defaults",
788 static_libs: [
789 "libbase",
790 "libbinder_random_parcel",
791 "libcutils",
792 ],
793 target: {
794 android: {
795 shared_libs: [
796 "libbinder_ndk",
797 "libbinder",
798 "libutils",
799 ],
800 },
801 host: {
802 static_libs: [
803 "libbinder_ndk",
804 "libbinder",
805 "libutils",
806 ],
807 },
808 darwin: {
809 enabled: false,
810 },
811 },
812 fuzz_config: {
813 cc: [
814 "smoreland@google.com",
815 "waghpawan@google.com",
816 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000817 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
818 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000819 },
820}