blob: 92d132f37c39ea6b218eedf3e33c7f78d1a67ff4 [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",
Steven Morelandea7659e2022-02-03 00:04:06 +0000103 ],
Steven Morelandcefba612020-11-05 22:57:06 +0000104 shared_libs: [
105 "libbinder",
Steven Morelandf80809b2021-10-07 18:09:20 -0700106 "libcutils",
Steven Morelandcefba612020-11-05 22:57:06 +0000107 "libutils",
108 ],
109 test_suites: ["general-tests"],
110}
111
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800112cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -0700113 name: "binderLibTest",
114 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800115 product_variables: {
116 binder32bit: {
117 cflags: ["-DBINDER_IPC_32BIT=1"],
118 },
119 },
120
Dan Willemsen59e086f2016-07-25 17:13:45 -0700121 srcs: ["binderLibTest.cpp"],
122 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -0700123 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700124 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -0700125 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700126 "libutils",
127 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700128 static_libs: [
129 "libgmock",
130 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000131 test_suites: [
132 "device-tests",
133 "vts",
134 ],
Dan Shi80ada592019-09-13 09:17:17 -0700135 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700136}
137
Steven Moreland37aff182021-03-26 02:04:16 +0000138aidl_interface {
139 name: "binderRpcTestIface",
140 host_supported: true,
141 unstable: true,
142 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700143 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000144 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700145 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000146 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000147 "IBinderRpcSession.aidl",
148 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700149 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000150 ],
151 backend: {
152 java: {
153 enabled: false,
154 },
155 },
156}
157
Yifan Honge0e53282021-09-23 18:37:21 -0700158cc_library_static {
159 name: "libbinder_tls_test_utils",
160 host_supported: true,
161 target: {
162 darwin: {
163 enabled: false,
164 },
165 },
166 defaults: [
167 "binder_test_defaults",
168 "libbinder_tls_shared_deps",
169 ],
170 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700171 "libbase",
172 "liblog",
173 ],
174 static_libs: [
175 "libbinder_tls_static",
176 ],
177 srcs: [
178 "RpcTlsTestUtils.cpp",
179 ],
180 export_include_dirs: [
181 "include_tls_test_utils",
182 ],
183 visibility: [
184 ":__subpackages__",
185 ],
186}
187
Andrei Homescu12106de2022-04-27 04:42:21 +0000188cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000189 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000190 host_supported: true,
191 target: {
192 darwin: {
193 enabled: false,
194 },
195 },
Steven Moreland37aff182021-03-26 02:04:16 +0000196 defaults: [
197 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000198 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000199
Andrei Homescu12106de2022-04-27 04:42:21 +0000200 static_libs: [
201 "libbinder_tls_static",
202 "libbinder_tls_test_utils",
203 "binderRpcTestIface-cpp",
204 "binderRpcTestIface-ndk",
205 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000206}
207
208cc_defaults {
209 name: "binderRpcTest_service_defaults",
210 defaults: [
211 "binderRpcTest_common_defaults",
212 ],
213 gtest: false,
214 auto_gen_config: false,
215 srcs: [
216 "binderRpcTestCommon.cpp",
217 "binderRpcTestService.cpp",
218 ],
219}
220
221cc_defaults {
222 name: "binderRpcTest_defaults",
223 target: {
224 android: {
225 test_suites: ["vts"],
226 },
227 },
228 defaults: [
229 "binderRpcTest_common_defaults",
230 ],
231
232 srcs: [
233 "binderRpcTest.cpp",
234 "binderRpcTestCommon.cpp",
235 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000236
237 test_suites: ["general-tests"],
238 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000239
240 data_bins: [
241 "binder_rpc_test_service",
242 "binder_rpc_test_service_no_kernel",
243 "binder_rpc_test_service_single_threaded",
244 "binder_rpc_test_service_single_threaded_no_kernel",
245 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000246}
247
Andrei Homescu2a298012022-06-15 01:08:54 +0000248cc_defaults {
249 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000250 cflags: [
251 "-DBINDER_WITH_KERNEL_IPC",
252 ],
253
Steven Moreland5553ac42020-11-11 02:14:45 +0000254 shared_libs: [
255 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000256 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000257 "libbase",
258 "libutils",
259 "libcutils",
260 "liblog",
261 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000262}
263
264cc_defaults {
265 name: "binderRpcTest_static_defaults",
266
267 shared_libs: [
268 "libutils",
269 // libcrypto_static is not visible to this module
270 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000271 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000272 static_libs: [
273 "libbase",
274 "libcutils",
275 "liblog",
276 "libssl",
277 ],
278
279 cflags: [
280 // Disable tests that require shared libraries,
281 // e.g., libbinder.so or libbinder_ndk.so
282 "-DBINDER_TEST_NO_SHARED_LIBS",
283 ],
284}
285
286cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000287 // The module name cannot start with "binderRpcTest" because
288 // then atest tries to execute it as part of binderRpcTest
289 name: "binder_rpc_test_service",
290 defaults: [
291 "binderRpcTest_service_defaults",
292 "binderRpcTest_shared_defaults",
293 "libbinder_tls_shared_deps",
294 ],
295}
296
297cc_test {
298 name: "binder_rpc_test_service_no_kernel",
299 defaults: [
300 "binderRpcTest_service_defaults",
301 "binderRpcTest_static_defaults",
302 ],
303 static_libs: [
304 "libbinder_rpc_no_kernel",
305 ],
306}
307
308cc_test {
309 name: "binder_rpc_test_service_single_threaded",
310 defaults: [
311 "binderRpcTest_service_defaults",
312 "binderRpcTest_static_defaults",
313 ],
314 cflags: [
315 "-DBINDER_RPC_SINGLE_THREADED",
316 "-DBINDER_WITH_KERNEL_IPC",
317 ],
318 static_libs: [
319 "libbinder_rpc_single_threaded",
320 ],
321}
322
323cc_test {
324 name: "binder_rpc_test_service_single_threaded_no_kernel",
325 defaults: [
326 "binderRpcTest_service_defaults",
327 "binderRpcTest_static_defaults",
328 ],
329 cflags: [
330 "-DBINDER_RPC_SINGLE_THREADED",
331 ],
332 static_libs: [
333 "libbinder_rpc_single_threaded_no_kernel",
334 ],
335}
336
337cc_test {
338 name: "binderRpcTest",
339 defaults: [
340 "binderRpcTest_defaults",
341 "binderRpcTest_shared_defaults",
342 "libbinder_tls_shared_deps",
343 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000344
345 // Add the Trusty mock library as a fake dependency so it gets built
346 required: [
347 "libbinder_on_trusty_mock",
348 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000349}
350
351cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000352 name: "binderRpcTestNoKernel",
353 defaults: [
354 "binderRpcTest_defaults",
355 "binderRpcTest_static_defaults",
356 ],
357 static_libs: [
358 "libbinder_rpc_no_kernel",
359 ],
360}
361
362cc_test {
363 name: "binderRpcTestSingleThreaded",
364 defaults: [
365 "binderRpcTest_defaults",
366 "binderRpcTest_static_defaults",
367 ],
368 cflags: [
369 "-DBINDER_RPC_SINGLE_THREADED",
370 "-DBINDER_WITH_KERNEL_IPC",
371 ],
372 static_libs: [
373 "libbinder_rpc_single_threaded",
374 ],
375}
376
377cc_test {
378 name: "binderRpcTestSingleThreadedNoKernel",
379 defaults: [
380 "binderRpcTest_defaults",
381 "binderRpcTest_static_defaults",
382 ],
383 cflags: [
384 "-DBINDER_RPC_SINGLE_THREADED",
385 ],
386 static_libs: [
387 "libbinder_rpc_single_threaded_no_kernel",
388 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000389}
390
Yifan Hongff73aa92021-09-17 21:28:01 -0700391cc_test {
392 name: "RpcTlsUtilsTest",
393 host_supported: true,
394 target: {
395 darwin: {
396 enabled: false,
397 },
398 android: {
399 test_suites: ["vts"],
400 },
401 },
402 defaults: [
403 "binder_test_defaults",
404 "libbinder_tls_shared_deps",
405 ],
406 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700407 "RpcTlsUtilsTest.cpp",
408 ],
409 shared_libs: [
410 "libbinder",
411 "libbase",
412 "libutils",
413 "liblog",
414 ],
415 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700416 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700417 "libbinder_tls_static",
418 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000419 test_suites: [
420 "general-tests",
421 "device-tests",
422 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700423}
424
Steven Morelandcda60852021-04-14 23:45:32 +0000425cc_benchmark {
426 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700427 defaults: [
428 "binder_test_defaults",
429 "libbinder_tls_shared_deps",
430 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000431 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000432 target: {
433 darwin: {
434 enabled: false,
435 },
436 },
Steven Morelandcda60852021-04-14 23:45:32 +0000437 srcs: [
438 "binderRpcBenchmark.cpp",
439 "IBinderRpcBenchmark.aidl",
440 ],
441 shared_libs: [
442 "libbase",
443 "libbinder",
444 "liblog",
445 "libutils",
446 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700447 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700448 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700449 "libbinder_tls_static",
450 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000451}
452
Steven Moreland5553ac42020-11-11 02:14:45 +0000453cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700454 name: "binderRpcWireProtocolTest",
455 host_supported: true,
456 target: {
457 darwin: {
458 enabled: false,
459 },
460 android: {
461 test_suites: ["vts"],
462 },
463 },
464 defaults: [
465 "binder_test_defaults",
466 ],
467 srcs: [
468 "binderRpcWireProtocolTest.cpp",
469 ],
470 shared_libs: [
471 "libbinder",
472 "libbase",
473 "libutils",
474 "libcutils",
475 "liblog",
476 ],
477 test_suites: ["general-tests"],
478}
479
480cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700481 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700482 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700483 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700484 shared_libs: [
485 "libbinder",
486 "libutils",
487 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700488 cflags: [
489 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700490 "-Wno-missing-field-initializers",
491 "-Wno-sign-compare",
492 "-O3",
493 ],
494}
Wei Wang78f2a372016-10-20 23:18:17 -0700495
496cc_test {
497 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700498 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700499 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700500 shared_libs: [
501 "libbinder",
502 "libutils",
503 "libbase",
504 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700505 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700506}
Howard Chenc135dbc2017-03-25 17:12:59 +0800507
508cc_test {
509 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700510 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700511 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800512 shared_libs: [
513 "libbinder",
514 "libutils",
515 "libbase",
516 ],
517}
Dan Stozad630e522016-12-01 15:16:31 -0800518
519cc_test {
520 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700521 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700522 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800523
524 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800525 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800526 ],
527
528 cpp_std: "experimental",
529 gnu_extensions: false,
530
531 shared_libs: [
532 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700533 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800534 "liblog",
535 "libutils",
536 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000537 test_suites: [
538 "device-tests",
539 "vts",
540 ],
Dan Shi80ada592019-09-13 09:17:17 -0700541 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800542}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700543
Steven Morelandf23dae22020-10-27 19:34:55 +0000544cc_test {
545 name: "binderClearBufTest",
546 defaults: ["binder_test_defaults"],
547 srcs: [
548 "binderClearBufTest.cpp",
549 ],
550
551 shared_libs: [
552 "libbase",
553 "libbinder",
554 "liblog",
555 "libutils",
556 ],
557
558 test_suites: ["general-tests"],
559 require_root: true,
560}
561
Steven Moreland12300a02019-08-02 13:27:15 -0700562aidl_interface {
563 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900564 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700565 srcs: [
566 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700567 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000568 backend: {
569 java: {
570 enabled: false,
571 },
572 },
Steven Moreland12300a02019-08-02 13:27:15 -0700573}
574
Steven Morelanddea3cf92019-07-16 18:06:55 -0700575cc_test {
576 name: "binderStabilityTest",
577 defaults: ["binder_test_defaults"],
578 srcs: [
579 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700580 ],
581
Steven Moreland13f84662020-07-23 21:30:41 +0000582 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700583 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700584 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700585 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700586 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700587 "libutils",
588 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700589 static_libs: [
590 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900591 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700592 ],
593
Steven Morelandea7659e2022-02-03 00:04:06 +0000594 test_suites: [
595 "device-tests",
596 "vts",
597 ],
Dan Shi302709b2019-09-19 15:28:15 -0700598 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700599}
Steven Moreland042ae822020-05-27 17:45:17 +0000600
601cc_test {
602 name: "binderAllocationLimits",
603 defaults: ["binder_test_defaults"],
604 srcs: ["binderAllocationLimits.cpp"],
605 shared_libs: [
606 "libbinder",
607 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000608 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000609 "libutils",
610 "libutilscallstack",
611 "libbase",
612 ],
613 test_suites: ["device-tests"],
614 require_root: true,
615}
Andy Hung73a14702020-11-24 13:04:46 -0800616
617cc_benchmark {
618 name: "binderParcelBenchmark",
619 defaults: ["binder_test_defaults"],
620 srcs: ["binderParcelBenchmark.cpp"],
621 shared_libs: [
622 "libbase",
623 "libbinder",
624 "liblog",
625 "libutils",
626 ],
627}
Yifan Hongaf766e62021-06-14 13:24:19 -0700628
629cc_test_host {
630 name: "binderUtilsHostTest",
631 defaults: ["binder_test_defaults"],
632 srcs: ["binderUtilsHostTest.cpp"],
633 shared_libs: [
634 "libbase",
635 "libbinder",
636 ],
637 static_libs: [
638 "libgmock",
639 ],
640 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700641 target: {
642 darwin: {
643 enabled: false,
644 },
645 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700646}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700647
648cc_test_host {
649 name: "binderHostDeviceTest",
650 defaults: ["binder_test_defaults"],
651 srcs: ["binderHostDeviceTest.cpp"],
652 test_config: "binderHostDeviceTest.xml",
653 shared_libs: [
654 "libbase",
655 "libbinder",
656 "liblog",
657 "libutils",
658 ],
659 static_libs: [
660 "libgmock",
661 ],
662 target_required: [
663 "binderHostDeviceTestService",
664 ],
665 test_suites: ["general-tests"],
666 target: {
667 darwin: {
668 enabled: false,
669 },
670 },
671 test_options: {
672 unit_test: false,
673 },
674}
675
676cc_test {
677 name: "binderHostDeviceTestService",
678 // The binary is named differently from the module so that PushFilePreparer pushes the binary
679 // directly, not the test module directory.
680 stem: "binderHostDeviceTest-service",
681 defaults: ["binder_test_defaults"],
682 gtest: false,
683 auto_gen_config: false,
684 srcs: ["binderHostDeviceTestService.cpp"],
685 shared_libs: [
686 "libbase",
687 "libbinder",
688 "liblog",
689 "libutils",
690 ],
691 test_suites: ["general-tests"],
692}
Pawanf00fabb2022-08-04 17:56:18 +0000693
694cc_defaults {
695 name: "service_fuzzer_defaults",
696 static_libs: [
697 "libbase",
698 "libbinder_random_parcel",
699 "libcutils",
700 ],
701 target: {
702 android: {
703 shared_libs: [
704 "libbinder_ndk",
705 "libbinder",
706 "libutils",
707 ],
708 },
709 host: {
710 static_libs: [
711 "libbinder_ndk",
712 "libbinder",
713 "libutils",
714 ],
715 },
716 darwin: {
717 enabled: false,
718 },
719 },
720 fuzz_config: {
721 cc: [
722 "smoreland@google.com",
723 "waghpawan@google.com",
724 ],
725 },
726}