blob: 7006f87314d2baa665d9e31be5c1c9d4dc28d480 [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 Homescu68a55612022-08-02 01:25:15 +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",
Andrei Homescu68a55612022-08-02 01:25:15 +0000162 vendor_available: true,
Yifan Honge0e53282021-09-23 18:37:21 -0700163 host_supported: true,
164 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 ],
Andrei Homescu68a55612022-08-02 01:25:15 +0000216 vendor_available: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000217 gtest: false,
218 auto_gen_config: false,
219 srcs: [
220 "binderRpcTestCommon.cpp",
221 "binderRpcTestService.cpp",
222 ],
223}
224
225cc_defaults {
226 name: "binderRpcTest_defaults",
Andrei Homescu68a55612022-08-02 01:25:15 +0000227 vendor_available: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000228 target: {
229 android: {
230 test_suites: ["vts"],
231 },
Andrei Homescu68a55612022-08-02 01:25:15 +0000232
233 vendor: {
234 shared_libs: [
235 "libbinder_trusty",
236 "libtrusty",
237 ],
238 },
Andrei Homescu2a298012022-06-15 01:08:54 +0000239 },
240 defaults: [
241 "binderRpcTest_common_defaults",
242 ],
243
244 srcs: [
245 "binderRpcTest.cpp",
246 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000247 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000248 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000249
250 test_suites: ["general-tests"],
251 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000252
253 data_bins: [
254 "binder_rpc_test_service",
255 "binder_rpc_test_service_no_kernel",
256 "binder_rpc_test_service_single_threaded",
257 "binder_rpc_test_service_single_threaded_no_kernel",
258 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000259}
260
Andrei Homescu2a298012022-06-15 01:08:54 +0000261cc_defaults {
262 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000263 cflags: [
264 "-DBINDER_WITH_KERNEL_IPC",
265 ],
266
Steven Moreland5553ac42020-11-11 02:14:45 +0000267 shared_libs: [
268 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000269 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000270 "libbase",
271 "libutils",
272 "libcutils",
273 "liblog",
274 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000275}
276
277cc_defaults {
278 name: "binderRpcTest_static_defaults",
279
280 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000281 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000282 "libutils",
283 // libcrypto_static is not visible to this module
284 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000285 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000286 static_libs: [
287 "libbase",
288 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000289 "libssl",
290 ],
291
292 cflags: [
293 // Disable tests that require shared libraries,
294 // e.g., libbinder.so or libbinder_ndk.so
295 "-DBINDER_TEST_NO_SHARED_LIBS",
296 ],
297}
298
299cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000300 // The module name cannot start with "binderRpcTest" because
301 // then atest tries to execute it as part of binderRpcTest
302 name: "binder_rpc_test_service",
303 defaults: [
304 "binderRpcTest_service_defaults",
305 "binderRpcTest_shared_defaults",
306 "libbinder_tls_shared_deps",
307 ],
308}
309
310cc_test {
311 name: "binder_rpc_test_service_no_kernel",
312 defaults: [
313 "binderRpcTest_service_defaults",
314 "binderRpcTest_static_defaults",
315 ],
316 static_libs: [
317 "libbinder_rpc_no_kernel",
318 ],
319}
320
321cc_test {
322 name: "binder_rpc_test_service_single_threaded",
323 defaults: [
324 "binderRpcTest_service_defaults",
325 "binderRpcTest_static_defaults",
326 ],
327 cflags: [
328 "-DBINDER_RPC_SINGLE_THREADED",
329 "-DBINDER_WITH_KERNEL_IPC",
330 ],
331 static_libs: [
332 "libbinder_rpc_single_threaded",
333 ],
334}
335
336cc_test {
337 name: "binder_rpc_test_service_single_threaded_no_kernel",
338 defaults: [
339 "binderRpcTest_service_defaults",
340 "binderRpcTest_static_defaults",
341 ],
342 cflags: [
343 "-DBINDER_RPC_SINGLE_THREADED",
344 ],
345 static_libs: [
346 "libbinder_rpc_single_threaded_no_kernel",
347 ],
348}
349
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000350cc_binary {
351 name: "binderRpcTestService_on_trusty_mock",
352 defaults: [
353 "trusty_mock_defaults",
354 ],
355
356 srcs: [
357 "binderRpcTestCommon.cpp",
358 "binderRpcTestServiceTrusty.cpp",
359 ],
360
361 shared_libs: [
362 "libbinder_on_trusty_mock",
363 "libbase",
364 "libutils",
365 "libcutils",
366 ],
367
368 static_libs: [
369 "binderRpcTestIface-cpp",
370 ],
371}
372
Andrei Homescu2a298012022-06-15 01:08:54 +0000373cc_test {
374 name: "binderRpcTest",
375 defaults: [
376 "binderRpcTest_defaults",
377 "binderRpcTest_shared_defaults",
378 "libbinder_tls_shared_deps",
379 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000380
381 // Add the Trusty mock library as a fake dependency so it gets built
382 required: [
383 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000384 "binderRpcTestService_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000385 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000386}
387
388cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000389 name: "binderRpcTestNoKernel",
390 defaults: [
391 "binderRpcTest_defaults",
392 "binderRpcTest_static_defaults",
393 ],
394 static_libs: [
395 "libbinder_rpc_no_kernel",
396 ],
397}
398
399cc_test {
400 name: "binderRpcTestSingleThreaded",
401 defaults: [
402 "binderRpcTest_defaults",
403 "binderRpcTest_static_defaults",
404 ],
405 cflags: [
406 "-DBINDER_RPC_SINGLE_THREADED",
407 "-DBINDER_WITH_KERNEL_IPC",
408 ],
409 static_libs: [
410 "libbinder_rpc_single_threaded",
411 ],
412}
413
414cc_test {
415 name: "binderRpcTestSingleThreadedNoKernel",
416 defaults: [
417 "binderRpcTest_defaults",
418 "binderRpcTest_static_defaults",
419 ],
420 cflags: [
421 "-DBINDER_RPC_SINGLE_THREADED",
422 ],
423 static_libs: [
424 "libbinder_rpc_single_threaded_no_kernel",
425 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000426}
427
Yifan Hongff73aa92021-09-17 21:28:01 -0700428cc_test {
429 name: "RpcTlsUtilsTest",
430 host_supported: true,
431 target: {
432 darwin: {
433 enabled: false,
434 },
435 android: {
436 test_suites: ["vts"],
437 },
438 },
439 defaults: [
440 "binder_test_defaults",
441 "libbinder_tls_shared_deps",
442 ],
443 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700444 "RpcTlsUtilsTest.cpp",
445 ],
446 shared_libs: [
447 "libbinder",
448 "libbase",
449 "libutils",
450 "liblog",
451 ],
452 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700453 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700454 "libbinder_tls_static",
455 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000456 test_suites: [
457 "general-tests",
458 "device-tests",
459 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700460}
461
Steven Morelandcda60852021-04-14 23:45:32 +0000462cc_benchmark {
463 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700464 defaults: [
465 "binder_test_defaults",
466 "libbinder_tls_shared_deps",
467 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000468 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000469 target: {
470 darwin: {
471 enabled: false,
472 },
473 },
Steven Morelandcda60852021-04-14 23:45:32 +0000474 srcs: [
475 "binderRpcBenchmark.cpp",
476 "IBinderRpcBenchmark.aidl",
477 ],
478 shared_libs: [
479 "libbase",
480 "libbinder",
481 "liblog",
482 "libutils",
483 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700484 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700485 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700486 "libbinder_tls_static",
487 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000488}
489
Steven Moreland5553ac42020-11-11 02:14:45 +0000490cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700491 name: "binderRpcWireProtocolTest",
492 host_supported: true,
493 target: {
494 darwin: {
495 enabled: false,
496 },
497 android: {
498 test_suites: ["vts"],
499 },
500 },
501 defaults: [
502 "binder_test_defaults",
503 ],
504 srcs: [
505 "binderRpcWireProtocolTest.cpp",
506 ],
507 shared_libs: [
508 "libbinder",
509 "libbase",
510 "libutils",
511 "libcutils",
512 "liblog",
513 ],
514 test_suites: ["general-tests"],
515}
516
517cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700518 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700519 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700520 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700521 shared_libs: [
522 "libbinder",
523 "libutils",
524 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700525 cflags: [
526 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700527 "-Wno-missing-field-initializers",
528 "-Wno-sign-compare",
529 "-O3",
530 ],
531}
Wei Wang78f2a372016-10-20 23:18:17 -0700532
533cc_test {
534 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700535 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700536 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700537 shared_libs: [
538 "libbinder",
539 "libutils",
540 "libbase",
541 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700542 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700543}
Howard Chenc135dbc2017-03-25 17:12:59 +0800544
545cc_test {
546 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700547 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700548 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800549 shared_libs: [
550 "libbinder",
551 "libutils",
552 "libbase",
553 ],
554}
Dan Stozad630e522016-12-01 15:16:31 -0800555
556cc_test {
557 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700558 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700559 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800560
561 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800562 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800563 ],
564
565 cpp_std: "experimental",
566 gnu_extensions: false,
567
568 shared_libs: [
569 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700570 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800571 "liblog",
572 "libutils",
573 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000574 test_suites: [
575 "device-tests",
576 "vts",
577 ],
Dan Shi80ada592019-09-13 09:17:17 -0700578 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800579}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700580
Steven Morelandf23dae22020-10-27 19:34:55 +0000581cc_test {
582 name: "binderClearBufTest",
583 defaults: ["binder_test_defaults"],
584 srcs: [
585 "binderClearBufTest.cpp",
586 ],
587
588 shared_libs: [
589 "libbase",
590 "libbinder",
591 "liblog",
592 "libutils",
593 ],
594
595 test_suites: ["general-tests"],
596 require_root: true,
597}
598
Steven Moreland12300a02019-08-02 13:27:15 -0700599aidl_interface {
600 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900601 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700602 srcs: [
603 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700604 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000605 backend: {
606 java: {
607 enabled: false,
608 },
609 },
Steven Moreland12300a02019-08-02 13:27:15 -0700610}
611
Steven Morelanddea3cf92019-07-16 18:06:55 -0700612cc_test {
613 name: "binderStabilityTest",
614 defaults: ["binder_test_defaults"],
615 srcs: [
616 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700617 ],
618
Steven Moreland13f84662020-07-23 21:30:41 +0000619 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700620 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700621 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700622 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700623 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700624 "libutils",
625 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700626 static_libs: [
627 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900628 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700629 ],
630
Steven Morelandea7659e2022-02-03 00:04:06 +0000631 test_suites: [
632 "device-tests",
633 "vts",
634 ],
Dan Shi302709b2019-09-19 15:28:15 -0700635 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700636}
Steven Moreland042ae822020-05-27 17:45:17 +0000637
638cc_test {
639 name: "binderAllocationLimits",
640 defaults: ["binder_test_defaults"],
641 srcs: ["binderAllocationLimits.cpp"],
642 shared_libs: [
643 "libbinder",
644 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000645 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000646 "libutils",
647 "libutilscallstack",
648 "libbase",
649 ],
650 test_suites: ["device-tests"],
651 require_root: true,
652}
Andy Hung73a14702020-11-24 13:04:46 -0800653
654cc_benchmark {
655 name: "binderParcelBenchmark",
656 defaults: ["binder_test_defaults"],
657 srcs: ["binderParcelBenchmark.cpp"],
658 shared_libs: [
659 "libbase",
660 "libbinder",
661 "liblog",
662 "libutils",
663 ],
664}
Yifan Hongaf766e62021-06-14 13:24:19 -0700665
666cc_test_host {
667 name: "binderUtilsHostTest",
668 defaults: ["binder_test_defaults"],
669 srcs: ["binderUtilsHostTest.cpp"],
670 shared_libs: [
671 "libbase",
672 "libbinder",
673 ],
674 static_libs: [
675 "libgmock",
676 ],
677 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700678 target: {
679 darwin: {
680 enabled: false,
681 },
682 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700683}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700684
685cc_test_host {
686 name: "binderHostDeviceTest",
687 defaults: ["binder_test_defaults"],
688 srcs: ["binderHostDeviceTest.cpp"],
689 test_config: "binderHostDeviceTest.xml",
690 shared_libs: [
691 "libbase",
692 "libbinder",
693 "liblog",
694 "libutils",
695 ],
696 static_libs: [
697 "libgmock",
698 ],
699 target_required: [
700 "binderHostDeviceTestService",
701 ],
702 test_suites: ["general-tests"],
703 target: {
704 darwin: {
705 enabled: false,
706 },
707 },
708 test_options: {
709 unit_test: false,
710 },
711}
712
713cc_test {
714 name: "binderHostDeviceTestService",
715 // The binary is named differently from the module so that PushFilePreparer pushes the binary
716 // directly, not the test module directory.
717 stem: "binderHostDeviceTest-service",
718 defaults: ["binder_test_defaults"],
719 gtest: false,
720 auto_gen_config: false,
721 srcs: ["binderHostDeviceTestService.cpp"],
722 shared_libs: [
723 "libbase",
724 "libbinder",
725 "liblog",
726 "libutils",
727 ],
728 test_suites: ["general-tests"],
729}
Pawanf00fabb2022-08-04 17:56:18 +0000730
731cc_defaults {
732 name: "service_fuzzer_defaults",
733 static_libs: [
734 "libbase",
735 "libbinder_random_parcel",
736 "libcutils",
737 ],
738 target: {
739 android: {
740 shared_libs: [
741 "libbinder_ndk",
742 "libbinder",
743 "libutils",
744 ],
745 },
746 host: {
747 static_libs: [
748 "libbinder_ndk",
749 "libbinder",
750 "libutils",
751 ],
752 },
753 darwin: {
754 enabled: false,
755 },
756 },
757 fuzz_config: {
758 cc: [
759 "smoreland@google.com",
760 "waghpawan@google.com",
761 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000762 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
763 hotlists: ["4637097"],
Pawanf00fabb2022-08-04 17:56:18 +0000764 },
765}