blob: f303b7c1e34a4a065fc74f9f9f4a60ea9709e404 [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"],
Hsin-Yi Chen69295752017-06-07 18:05:05 +080038 compile_multilib: "32",
Steven Morelandf9f3de22020-05-06 17:14:39 -070039 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chen69295752017-06-07 18:05:05 +080040 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070041 test_suites: ["vts"],
Hsin-Yi Chen69295752017-06-07 18:05:05 +080042}
43
44cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070045 name: "binderDriverInterfaceTest",
46 defaults: ["binder_test_defaults"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070047 product_variables: {
48 binder32bit: {
49 cflags: ["-DBINDER_IPC_32BIT=1"],
50 },
51 },
52
Dan Willemsen59e086f2016-07-25 17:13:45 -070053 srcs: ["binderDriverInterfaceTest.cpp"],
Dan Shieb25b672020-03-26 11:43:04 -070054 test_suites: ["device-tests", "vts"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070055}
56
57cc_test {
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080058 name: "binderLibTest_IPC_32",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070059 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -070060 srcs: ["binderLibTest.cpp"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080061 shared_libs: [
62 "libbinder",
63 "libutils",
64 ],
65 compile_multilib: "32",
Steven Morelandf9f3de22020-05-06 17:14:39 -070066 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080067 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070068 test_suites: ["vts"],
69 require_root: true,
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080070}
71
Steven Morelandcefba612020-11-05 22:57:06 +000072// unit test only, which can run on host and doesn't use /dev/binder
73cc_test {
74 name: "binderParcelTest",
75 host_supported: true,
76 target: {
77 darwin: {
78 enabled: false,
79 },
80 },
81 srcs: ["binderParcelTest.cpp"],
82 shared_libs: [
83 "libbinder",
84 "libutils",
85 ],
86 test_suites: ["general-tests"],
87}
88
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080089cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070090 name: "binderLibTest",
91 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080092 product_variables: {
93 binder32bit: {
94 cflags: ["-DBINDER_IPC_32BIT=1"],
95 },
96 },
97
Dan Willemsen59e086f2016-07-25 17:13:45 -070098 srcs: ["binderLibTest.cpp"],
99 shared_libs: [
100 "libbinder",
101 "libutils",
102 ],
Dan Shieb25b672020-03-26 11:43:04 -0700103 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700104 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700105}
106
Steven Moreland37aff182021-03-26 02:04:16 +0000107aidl_interface {
108 name: "binderRpcTestIface",
109 host_supported: true,
110 unstable: true,
111 srcs: [
112 "IBinderRpcSession.aidl",
113 "IBinderRpcTest.aidl",
114 ],
115 backend: {
116 java: {
117 enabled: false,
118 },
119 },
120}
121
Dan Willemsen59e086f2016-07-25 17:13:45 -0700122cc_test {
Steven Moreland5553ac42020-11-11 02:14:45 +0000123 name: "binderRpcTest",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000124 host_supported: true,
125 target: {
126 darwin: {
127 enabled: false,
128 },
129 },
Steven Moreland37aff182021-03-26 02:04:16 +0000130 defaults: [
131 "binder_test_defaults",
132 "libbinder_ndk_host_user",
133 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000134
135 srcs: [
Steven Moreland5553ac42020-11-11 02:14:45 +0000136 "binderRpcTest.cpp",
137 ],
138 shared_libs: [
139 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000140 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000141 "libbase",
142 "libutils",
143 "libcutils",
144 "liblog",
145 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000146 static_libs: [
147 "binderRpcTestIface-cpp",
148 "binderRpcTestIface-ndk_platform",
149 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000150 test_suites: ["general-tests"],
151 require_root: true,
152}
153
Steven Morelandcda60852021-04-14 23:45:32 +0000154cc_benchmark {
155 name: "binderRpcBenchmark",
156 defaults: ["binder_test_defaults"],
157 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000158 target: {
159 darwin: {
160 enabled: false,
161 },
162 },
Steven Morelandcda60852021-04-14 23:45:32 +0000163 srcs: [
164 "binderRpcBenchmark.cpp",
165 "IBinderRpcBenchmark.aidl",
166 ],
167 shared_libs: [
168 "libbase",
169 "libbinder",
170 "liblog",
171 "libutils",
172 ],
173}
174
Steven Moreland5553ac42020-11-11 02:14:45 +0000175cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700176 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700177 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700178 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700179 shared_libs: [
180 "libbinder",
181 "libutils",
182 ],
183 clang: true,
184 cflags: [
185 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700186 "-Wno-missing-field-initializers",
187 "-Wno-sign-compare",
188 "-O3",
189 ],
190}
Wei Wang78f2a372016-10-20 23:18:17 -0700191
192cc_test {
193 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700194 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700195 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700196 shared_libs: [
197 "libbinder",
198 "libutils",
199 "libbase",
200 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700201 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700202}
Howard Chenc135dbc2017-03-25 17:12:59 +0800203
204cc_test {
205 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700206 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700207 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800208 shared_libs: [
209 "libbinder",
210 "libutils",
211 "libbase",
212 ],
213}
Dan Stozad630e522016-12-01 15:16:31 -0800214
215cc_test {
216 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700217 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700218 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800219
220 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800221 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800222 ],
223
224 cpp_std: "experimental",
225 gnu_extensions: false,
226
227 shared_libs: [
228 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700229 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800230 "liblog",
231 "libutils",
232 ],
Dan Shieb25b672020-03-26 11:43:04 -0700233 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700234 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800235}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700236
Steven Morelandf23dae22020-10-27 19:34:55 +0000237cc_test {
238 name: "binderClearBufTest",
239 defaults: ["binder_test_defaults"],
240 srcs: [
241 "binderClearBufTest.cpp",
242 ],
243
244 shared_libs: [
245 "libbase",
246 "libbinder",
247 "liblog",
248 "libutils",
249 ],
250
251 test_suites: ["general-tests"],
252 require_root: true,
253}
254
Steven Moreland12300a02019-08-02 13:27:15 -0700255aidl_interface {
256 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900257 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700258 srcs: [
259 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700260 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000261 backend: {
262 java: {
263 enabled: false,
264 },
265 },
Steven Moreland12300a02019-08-02 13:27:15 -0700266}
267
Steven Morelanddea3cf92019-07-16 18:06:55 -0700268cc_test {
269 name: "binderStabilityTest",
270 defaults: ["binder_test_defaults"],
271 srcs: [
272 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700273 ],
274
Steven Moreland13f84662020-07-23 21:30:41 +0000275 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700276 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700277 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700278 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700279 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700280 "libutils",
281 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700282 static_libs: [
283 "binderStabilityTestIface-cpp",
284 "binderStabilityTestIface-ndk_platform",
285 ],
286
Steven Moreland13f84662020-07-23 21:30:41 +0000287 test_suites: ["device-tests", "vts"],
Dan Shi302709b2019-09-19 15:28:15 -0700288 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700289}
Steven Moreland042ae822020-05-27 17:45:17 +0000290
291cc_test {
292 name: "binderAllocationLimits",
293 defaults: ["binder_test_defaults"],
294 srcs: ["binderAllocationLimits.cpp"],
295 shared_libs: [
296 "libbinder",
297 "liblog",
298 "libutils",
299 "libutilscallstack",
300 "libbase",
301 ],
302 test_suites: ["device-tests"],
303 require_root: true,
304}
Andy Hung73a14702020-11-24 13:04:46 -0800305
306cc_benchmark {
307 name: "binderParcelBenchmark",
308 defaults: ["binder_test_defaults"],
309 srcs: ["binderParcelBenchmark.cpp"],
310 shared_libs: [
311 "libbase",
312 "libbinder",
313 "liblog",
314 "libutils",
315 ],
316}