blob: aba231948518515d0030d4c29df0874b3a83f3ff [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"],
Pawan Wagh76b18152023-12-01 14:30:26 +000072 cflags: [
73 "-DBINDER_WITH_KERNEL_IPC",
74 ],
Steven Morelanda8244b92023-04-20 23:34:11 +000075 shared_libs: [
76 "libbinder",
77 "libcutils",
78 "libutils",
Pawan Wagh76b18152023-12-01 14:30:26 +000079 "liblog",
Steven Morelanda8244b92023-04-20 23:34:11 +000080 ],
81 static_libs: [
82 "binderRecordReplayTestIface-cpp",
Pawan Wagh8da45382023-05-11 08:08:50 +000083 "binderReadParcelIface-cpp",
Pawan Wagh94bf3032023-07-27 17:15:02 +000084 "libbinder_random_parcel_seeds",
85 "libbinder_random_parcel",
Steven Morelanda8244b92023-04-20 23:34:11 +000086 ],
87 test_suites: ["general-tests"],
Steven Moreland4ed688d2023-05-03 23:03:56 +000088 require_root: true,
Steven Morelanda8244b92023-04-20 23:34:11 +000089}
90
91aidl_interface {
92 name: "binderRecordReplayTestIface",
93 unstable: true,
94 srcs: [
95 "IBinderRecordReplayTest.aidl",
96 ],
Pawan Wagh8da45382023-05-11 08:08:50 +000097 imports: ["binderReadParcelIface"],
98 backend: {
99 java: {
100 enabled: true,
101 platform_apis: true,
102 },
Pawan Wagh76b18152023-12-01 14:30:26 +0000103 ndk: {
104 enabled: false,
105 },
Pawan Wagh8da45382023-05-11 08:08:50 +0000106 },
Steven Morelanda8244b92023-04-20 23:34:11 +0000107}
108
109cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -0700110 name: "binderLibTest",
111 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +0800112
Dan Willemsen59e086f2016-07-25 17:13:45 -0700113 srcs: ["binderLibTest.cpp"],
114 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -0700115 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700116 "libbinder",
Yifan Hong8b890852021-06-10 13:44:09 -0700117 "liblog",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700118 "libutils",
119 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700120 static_libs: [
121 "libgmock",
122 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000123 test_suites: [
124 "device-tests",
125 "vts",
126 ],
Dan Shi80ada592019-09-13 09:17:17 -0700127 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700128}
129
Steven Moreland37aff182021-03-26 02:04:16 +0000130aidl_interface {
131 name: "binderRpcTestIface",
Andrei Homescud65666d2023-03-03 07:28:02 +0000132 vendor_available: true,
Steven Moreland37aff182021-03-26 02:04:16 +0000133 host_supported: true,
134 unstable: true,
135 srcs: [
Yifan Hong1deca4b2021-09-10 16:16:44 -0700136 "BinderRpcTestClientInfo.aidl",
Andrei Homescu2a298012022-06-15 01:08:54 +0000137 "BinderRpcTestServerConfig.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700138 "BinderRpcTestServerInfo.aidl",
Steven Moreland659416d2021-05-11 00:47:50 +0000139 "IBinderRpcCallback.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000140 "IBinderRpcSession.aidl",
141 "IBinderRpcTest.aidl",
Yifan Hong1deca4b2021-09-10 16:16:44 -0700142 "ParcelableCertificateData.aidl",
Steven Moreland37aff182021-03-26 02:04:16 +0000143 ],
Tomasz Wasilczyk7c511e92023-12-04 17:00:28 -0800144 flags: [
145 "-Werror",
146 "-Wno-mixed-oneway",
147 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000148 backend: {
149 java: {
150 enabled: false,
151 },
152 },
153}
154
Yifan Honge0e53282021-09-23 18:37:21 -0700155cc_library_static {
156 name: "libbinder_tls_test_utils",
157 host_supported: true,
Andrei Homescud65666d2023-03-03 07:28:02 +0000158 vendor_available: true,
Yifan Honge0e53282021-09-23 18:37:21 -0700159 target: {
160 darwin: {
161 enabled: false,
162 },
163 },
164 defaults: [
165 "binder_test_defaults",
166 "libbinder_tls_shared_deps",
167 ],
168 shared_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700169 "libbase",
170 "liblog",
171 ],
172 static_libs: [
173 "libbinder_tls_static",
174 ],
175 srcs: [
176 "RpcTlsTestUtils.cpp",
177 ],
178 export_include_dirs: [
179 "include_tls_test_utils",
180 ],
181 visibility: [
182 ":__subpackages__",
183 ],
184}
185
Tomasz Wasilczyk26db5e42023-11-02 11:45:11 -0700186cc_library_static {
187 name: "libbinder_test_utils",
188 host_supported: true,
189 vendor_available: true,
190 target: {
191 darwin: {
192 enabled: false,
193 },
194 },
195 defaults: [
196 "binder_test_defaults",
197 ],
198 shared_libs: [
199 "libbase",
200 "liblog",
201 ],
202 srcs: [
203 "FileUtils.cpp",
204 ],
205 visibility: [
206 ":__subpackages__",
207 ],
208}
209
Andrei Homescu12106de2022-04-27 04:42:21 +0000210cc_defaults {
Andrei Homescu2a298012022-06-15 01:08:54 +0000211 name: "binderRpcTest_common_defaults",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000212 host_supported: true,
213 target: {
214 darwin: {
215 enabled: false,
216 },
217 },
Steven Moreland37aff182021-03-26 02:04:16 +0000218 defaults: [
219 "binder_test_defaults",
Steven Moreland37aff182021-03-26 02:04:16 +0000220 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000221
Andrei Homescu12106de2022-04-27 04:42:21 +0000222 static_libs: [
Tomasz Wasilczyk26db5e42023-11-02 11:45:11 -0700223 "libbinder_test_utils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000224 "libbinder_tls_static",
225 "libbinder_tls_test_utils",
226 "binderRpcTestIface-cpp",
227 "binderRpcTestIface-ndk",
228 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000229}
230
231cc_defaults {
232 name: "binderRpcTest_service_defaults",
233 defaults: [
234 "binderRpcTest_common_defaults",
235 ],
236 gtest: false,
237 auto_gen_config: false,
238 srcs: [
239 "binderRpcTestCommon.cpp",
240 "binderRpcTestService.cpp",
241 ],
242}
243
244cc_defaults {
245 name: "binderRpcTest_defaults",
246 target: {
247 android: {
248 test_suites: ["vts"],
249 },
250 },
251 defaults: [
252 "binderRpcTest_common_defaults",
253 ],
254
255 srcs: [
256 "binderRpcTest.cpp",
257 "binderRpcTestCommon.cpp",
Andrei Homescu9a9b1b42022-10-14 01:40:59 +0000258 "binderRpcUniversalTests.cpp",
Andrei Homescu2a298012022-06-15 01:08:54 +0000259 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000260
Steven Moreland20531612023-04-04 18:03:24 +0000261 // This test uses a lot of resources and takes a long time. Due to
262 // design of several tests, it is also very sensitive to resource
263 // contention on the device. b/276820894
264 test_options: {
265 unit_test: false,
Steven Morelandf6b18f22023-12-16 04:46:22 +0000266 test_runner_options: [
267 {
268 name: "native-test-timeout",
269 value: "10m",
270 },
271 ],
Steven Moreland20531612023-04-04 18:03:24 +0000272 },
273
Andrei Homescu12106de2022-04-27 04:42:21 +0000274 test_suites: ["general-tests"],
275 require_root: true,
Andrei Homescu2a298012022-06-15 01:08:54 +0000276
277 data_bins: [
278 "binder_rpc_test_service",
279 "binder_rpc_test_service_no_kernel",
280 "binder_rpc_test_service_single_threaded",
281 "binder_rpc_test_service_single_threaded_no_kernel",
282 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000283}
284
Andrei Homescu2a298012022-06-15 01:08:54 +0000285cc_defaults {
286 name: "binderRpcTest_shared_defaults",
Andrei Homescu12106de2022-04-27 04:42:21 +0000287 cflags: [
288 "-DBINDER_WITH_KERNEL_IPC",
289 ],
290
Steven Moreland5553ac42020-11-11 02:14:45 +0000291 shared_libs: [
292 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000293 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000294 "libbase",
295 "libutils",
296 "libcutils",
297 "liblog",
298 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000299}
300
301cc_defaults {
302 name: "binderRpcTest_static_defaults",
303
304 shared_libs: [
Andrei Homescu68a55612022-08-02 01:25:15 +0000305 "liblog",
Andrei Homescu12106de2022-04-27 04:42:21 +0000306 "libutils",
307 // libcrypto_static is not visible to this module
308 "libcrypto",
Steven Moreland37aff182021-03-26 02:04:16 +0000309 ],
Andrei Homescu12106de2022-04-27 04:42:21 +0000310 static_libs: [
311 "libbase",
312 "libcutils",
Andrei Homescu12106de2022-04-27 04:42:21 +0000313 "libssl",
314 ],
315
316 cflags: [
317 // Disable tests that require shared libraries,
318 // e.g., libbinder.so or libbinder_ndk.so
319 "-DBINDER_TEST_NO_SHARED_LIBS",
320 ],
321}
322
323cc_test {
Andrei Homescu2a298012022-06-15 01:08:54 +0000324 // The module name cannot start with "binderRpcTest" because
325 // then atest tries to execute it as part of binderRpcTest
326 name: "binder_rpc_test_service",
327 defaults: [
328 "binderRpcTest_service_defaults",
329 "binderRpcTest_shared_defaults",
330 "libbinder_tls_shared_deps",
331 ],
332}
333
334cc_test {
335 name: "binder_rpc_test_service_no_kernel",
336 defaults: [
337 "binderRpcTest_service_defaults",
338 "binderRpcTest_static_defaults",
339 ],
340 static_libs: [
341 "libbinder_rpc_no_kernel",
342 ],
343}
344
345cc_test {
346 name: "binder_rpc_test_service_single_threaded",
347 defaults: [
348 "binderRpcTest_service_defaults",
349 "binderRpcTest_static_defaults",
350 ],
351 cflags: [
352 "-DBINDER_RPC_SINGLE_THREADED",
353 "-DBINDER_WITH_KERNEL_IPC",
354 ],
355 static_libs: [
356 "libbinder_rpc_single_threaded",
357 ],
358}
359
360cc_test {
361 name: "binder_rpc_test_service_single_threaded_no_kernel",
362 defaults: [
363 "binderRpcTest_service_defaults",
364 "binderRpcTest_static_defaults",
365 ],
366 cflags: [
367 "-DBINDER_RPC_SINGLE_THREADED",
368 ],
369 static_libs: [
370 "libbinder_rpc_single_threaded_no_kernel",
371 ],
372}
373
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000374cc_binary {
375 name: "binderRpcTestService_on_trusty_mock",
376 defaults: [
377 "trusty_mock_defaults",
378 ],
379
380 srcs: [
381 "binderRpcTestCommon.cpp",
382 "binderRpcTestServiceTrusty.cpp",
383 ],
384
385 shared_libs: [
386 "libbinder_on_trusty_mock",
387 "libbase",
388 "libutils",
389 "libcutils",
390 ],
391
392 static_libs: [
393 "binderRpcTestIface-cpp",
394 ],
395}
396
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000397cc_binary {
398 name: "binderRpcTest_on_trusty_mock",
399 defaults: [
400 "trusty_mock_defaults",
401 ],
402
403 srcs: [
404 "binderRpcUniversalTests.cpp",
405 "binderRpcTestCommon.cpp",
406 "binderRpcTestTrusty.cpp",
407 ],
408
409 shared_libs: [
410 "libbinder_on_trusty_mock",
411 "libbase",
412 "libutils",
413 "libcutils",
414 ],
415
416 static_libs: [
417 "binderRpcTestIface-cpp",
418 "libgtest",
419 ],
420}
421
Andrei Homescu2a298012022-06-15 01:08:54 +0000422cc_test {
423 name: "binderRpcTest",
424 defaults: [
425 "binderRpcTest_defaults",
426 "binderRpcTest_shared_defaults",
427 "libbinder_tls_shared_deps",
428 ],
Andrei Homescu875996f2022-08-24 04:25:11 +0000429
430 // Add the Trusty mock library as a fake dependency so it gets built
431 required: [
432 "libbinder_on_trusty_mock",
Andrei Homescu9d8adb12022-08-02 04:38:30 +0000433 "binderRpcTestService_on_trusty_mock",
Andrei Homescu4d9420e2023-01-31 01:38:48 +0000434 "binderRpcTest_on_trusty_mock",
Andrei Homescu875996f2022-08-24 04:25:11 +0000435 ],
Andrei Homescu2a298012022-06-15 01:08:54 +0000436}
437
438cc_test {
Andrei Homescu12106de2022-04-27 04:42:21 +0000439 name: "binderRpcTestNoKernel",
440 defaults: [
441 "binderRpcTest_defaults",
442 "binderRpcTest_static_defaults",
443 ],
444 static_libs: [
445 "libbinder_rpc_no_kernel",
446 ],
447}
448
449cc_test {
450 name: "binderRpcTestSingleThreaded",
451 defaults: [
452 "binderRpcTest_defaults",
453 "binderRpcTest_static_defaults",
454 ],
455 cflags: [
456 "-DBINDER_RPC_SINGLE_THREADED",
457 "-DBINDER_WITH_KERNEL_IPC",
458 ],
459 static_libs: [
460 "libbinder_rpc_single_threaded",
461 ],
462}
463
464cc_test {
465 name: "binderRpcTestSingleThreadedNoKernel",
466 defaults: [
467 "binderRpcTest_defaults",
468 "binderRpcTest_static_defaults",
469 ],
470 cflags: [
471 "-DBINDER_RPC_SINGLE_THREADED",
472 ],
473 static_libs: [
474 "libbinder_rpc_single_threaded_no_kernel",
475 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000476}
477
Yifan Hongff73aa92021-09-17 21:28:01 -0700478cc_test {
Andrei Homescud65666d2023-03-03 07:28:02 +0000479 name: "binderRpcToTrustyTest",
480 vendor: true,
481 host_supported: false,
482 defaults: [
483 "binderRpcTest_common_defaults",
484 "binderRpcTest_static_defaults",
485 ],
486
487 srcs: [
488 "binderRpcTest.cpp",
489 "binderRpcTestCommon.cpp",
490 "binderRpcUniversalTests.cpp",
491 ],
492
493 cflags: [
494 "-DBINDER_RPC_TO_TRUSTY_TEST",
495 ],
496
497 static_libs: [
498 // We want to link libbinder statically so we can push the binary
499 // to the device for testing independently of the library
500 "libbinder_rpc_no_kernel",
501 "libbinder_trusty",
502 "libtrusty",
503 ],
504
505 test_suites: ["device-tests"],
506 require_root: true,
507}
508
509cc_test {
Yifan Hongff73aa92021-09-17 21:28:01 -0700510 name: "RpcTlsUtilsTest",
511 host_supported: true,
512 target: {
513 darwin: {
514 enabled: false,
515 },
516 android: {
517 test_suites: ["vts"],
518 },
519 },
520 defaults: [
521 "binder_test_defaults",
522 "libbinder_tls_shared_deps",
523 ],
524 srcs: [
Yifan Hongff73aa92021-09-17 21:28:01 -0700525 "RpcTlsUtilsTest.cpp",
526 ],
527 shared_libs: [
528 "libbinder",
529 "libbase",
530 "libutils",
531 "liblog",
532 ],
533 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700534 "libbinder_tls_test_utils",
Yifan Hongff73aa92021-09-17 21:28:01 -0700535 "libbinder_tls_static",
536 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000537 test_suites: [
538 "general-tests",
539 "device-tests",
540 ],
Yifan Hongff73aa92021-09-17 21:28:01 -0700541}
542
Steven Morelandcda60852021-04-14 23:45:32 +0000543cc_benchmark {
544 name: "binderRpcBenchmark",
Yifan Hongaecdd172021-09-21 14:53:13 -0700545 defaults: [
546 "binder_test_defaults",
547 "libbinder_tls_shared_deps",
548 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000549 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000550 target: {
551 darwin: {
552 enabled: false,
553 },
554 },
Steven Morelandcda60852021-04-14 23:45:32 +0000555 srcs: [
556 "binderRpcBenchmark.cpp",
557 "IBinderRpcBenchmark.aidl",
558 ],
559 shared_libs: [
560 "libbase",
561 "libbinder",
562 "liblog",
563 "libutils",
564 ],
Yifan Hongaecdd172021-09-21 14:53:13 -0700565 static_libs: [
Yifan Honge0e53282021-09-23 18:37:21 -0700566 "libbinder_tls_test_utils",
Yifan Hongaecdd172021-09-21 14:53:13 -0700567 "libbinder_tls_static",
568 ],
Steven Morelandcda60852021-04-14 23:45:32 +0000569}
570
Steven Moreland5553ac42020-11-11 02:14:45 +0000571cc_test {
Steven Moreland59640db2021-07-22 17:19:31 -0700572 name: "binderRpcWireProtocolTest",
573 host_supported: true,
574 target: {
575 darwin: {
576 enabled: false,
577 },
578 android: {
579 test_suites: ["vts"],
580 },
581 },
582 defaults: [
583 "binder_test_defaults",
584 ],
585 srcs: [
586 "binderRpcWireProtocolTest.cpp",
587 ],
588 shared_libs: [
589 "libbinder",
590 "libbase",
591 "libutils",
592 "libcutils",
593 "liblog",
594 ],
595 test_suites: ["general-tests"],
596}
597
598cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700599 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700600 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700601 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700602 shared_libs: [
603 "libbinder",
604 "libutils",
605 ],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700606 cflags: [
607 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700608 "-Wno-missing-field-initializers",
609 "-Wno-sign-compare",
610 "-O3",
611 ],
612}
Wei Wang78f2a372016-10-20 23:18:17 -0700613
614cc_test {
615 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700616 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700617 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700618 shared_libs: [
619 "libbinder",
620 "libutils",
621 "libbase",
622 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700623 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700624}
Howard Chenc135dbc2017-03-25 17:12:59 +0800625
626cc_test {
627 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700628 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700629 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800630 shared_libs: [
631 "libbinder",
632 "libutils",
633 "libbase",
634 ],
635}
Dan Stozad630e522016-12-01 15:16:31 -0800636
637cc_test {
638 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700639 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700640 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800641
642 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800643 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800644 ],
645
646 cpp_std: "experimental",
647 gnu_extensions: false,
648
649 shared_libs: [
650 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700651 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800652 "liblog",
653 "libutils",
654 ],
Steven Morelandea7659e2022-02-03 00:04:06 +0000655 test_suites: [
656 "device-tests",
657 "vts",
658 ],
Dan Shi80ada592019-09-13 09:17:17 -0700659 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800660}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700661
Steven Morelandf23dae22020-10-27 19:34:55 +0000662cc_test {
663 name: "binderClearBufTest",
664 defaults: ["binder_test_defaults"],
665 srcs: [
666 "binderClearBufTest.cpp",
667 ],
668
669 shared_libs: [
670 "libbase",
671 "libbinder",
672 "liblog",
673 "libutils",
674 ],
675
676 test_suites: ["general-tests"],
677 require_root: true,
678}
679
Steven Moreland12300a02019-08-02 13:27:15 -0700680aidl_interface {
681 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900682 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700683 srcs: [
684 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700685 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000686 backend: {
687 java: {
688 enabled: false,
689 },
690 },
Steven Moreland12300a02019-08-02 13:27:15 -0700691}
692
Steven Morelanddea3cf92019-07-16 18:06:55 -0700693cc_test {
694 name: "binderStabilityTest",
695 defaults: ["binder_test_defaults"],
696 srcs: [
697 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700698 ],
699
Steven Moreland13f84662020-07-23 21:30:41 +0000700 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700701 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700702 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700703 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700704 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700705 "libutils",
706 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700707 static_libs: [
708 "binderStabilityTestIface-cpp",
Jiyong Park9a9427c2021-08-09 09:01:15 +0900709 "binderStabilityTestIface-ndk",
Steven Moreland12300a02019-08-02 13:27:15 -0700710 ],
711
Steven Morelandea7659e2022-02-03 00:04:06 +0000712 test_suites: [
713 "device-tests",
714 "vts",
715 ],
Dan Shi302709b2019-09-19 15:28:15 -0700716 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700717}
Steven Moreland042ae822020-05-27 17:45:17 +0000718
719cc_test {
720 name: "binderAllocationLimits",
721 defaults: ["binder_test_defaults"],
722 srcs: ["binderAllocationLimits.cpp"],
723 shared_libs: [
724 "libbinder",
725 "liblog",
Steven Moreland66acefe2022-09-09 00:34:40 +0000726 "libcutils",
Steven Moreland042ae822020-05-27 17:45:17 +0000727 "libutils",
728 "libutilscallstack",
729 "libbase",
730 ],
731 test_suites: ["device-tests"],
732 require_root: true,
733}
Andy Hung73a14702020-11-24 13:04:46 -0800734
735cc_benchmark {
736 name: "binderParcelBenchmark",
737 defaults: ["binder_test_defaults"],
738 srcs: ["binderParcelBenchmark.cpp"],
739 shared_libs: [
740 "libbase",
741 "libbinder",
742 "liblog",
743 "libutils",
744 ],
Steven Moreland9b254dd2023-05-11 00:37:55 +0000745 test_suites: ["general-tests"],
Andy Hung73a14702020-11-24 13:04:46 -0800746}
Yifan Hongaf766e62021-06-14 13:24:19 -0700747
748cc_test_host {
749 name: "binderUtilsHostTest",
750 defaults: ["binder_test_defaults"],
751 srcs: ["binderUtilsHostTest.cpp"],
752 shared_libs: [
753 "libbase",
754 "libbinder",
755 ],
756 static_libs: [
757 "libgmock",
758 ],
759 test_suites: ["general-tests"],
Yifan Hong44dec542021-06-22 10:47:44 -0700760 target: {
761 darwin: {
762 enabled: false,
763 },
764 },
Yifan Hongaf766e62021-06-14 13:24:19 -0700765}
Yifan Hong1b6f12f2021-06-03 20:01:57 -0700766
767cc_test_host {
768 name: "binderHostDeviceTest",
769 defaults: ["binder_test_defaults"],
770 srcs: ["binderHostDeviceTest.cpp"],
771 test_config: "binderHostDeviceTest.xml",
772 shared_libs: [
773 "libbase",
774 "libbinder",
775 "liblog",
776 "libutils",
777 ],
778 static_libs: [
779 "libgmock",
780 ],
781 target_required: [
782 "binderHostDeviceTestService",
783 ],
784 test_suites: ["general-tests"],
785 target: {
786 darwin: {
787 enabled: false,
788 },
789 },
790 test_options: {
791 unit_test: false,
792 },
793}
794
795cc_test {
796 name: "binderHostDeviceTestService",
797 // The binary is named differently from the module so that PushFilePreparer pushes the binary
798 // directly, not the test module directory.
799 stem: "binderHostDeviceTest-service",
800 defaults: ["binder_test_defaults"],
801 gtest: false,
802 auto_gen_config: false,
803 srcs: ["binderHostDeviceTestService.cpp"],
804 shared_libs: [
805 "libbase",
806 "libbinder",
807 "liblog",
808 "libutils",
809 ],
810 test_suites: ["general-tests"],
811}
Pawanf00fabb2022-08-04 17:56:18 +0000812
813cc_defaults {
814 name: "service_fuzzer_defaults",
815 static_libs: [
816 "libbase",
817 "libbinder_random_parcel",
818 "libcutils",
819 ],
820 target: {
821 android: {
822 shared_libs: [
823 "libbinder_ndk",
824 "libbinder",
825 "libutils",
826 ],
827 },
828 host: {
829 static_libs: [
830 "libbinder_ndk",
831 "libbinder",
832 "libutils",
833 ],
834 },
835 darwin: {
836 enabled: false,
837 },
838 },
839 fuzz_config: {
840 cc: [
841 "smoreland@google.com",
842 "waghpawan@google.com",
843 ],
Pawan Wagh595377b2022-11-16 08:42:20 +0000844 // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer
845 hotlists: ["4637097"],
Pawan Wagh813a06f2023-12-21 23:39:39 +0000846 use_for_presubmit: true,
Pawanf00fabb2022-08-04 17:56:18 +0000847 },
848}
Pawan Wagh475f66c2023-05-05 21:46:07 +0000849
850cc_defaults {
851 name: "fuzzer_disable_leaks",
Pawan Wagh9e2d2962023-06-20 23:43:24 +0000852 fuzz_config: {
853 asan_options: [
854 "detect_leaks=0",
855 ],
856 hwasan_options: [
857 "detect_leaks=0",
858 ],
859 },
Pawan Wagh475f66c2023-05-05 21:46:07 +0000860}