blob: c0f7c99564787b4c1e0d2fd7fdeb7a21e6e58483 [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 Morelandf9f3de22020-05-06 17:14:39 -070040 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chen69295752017-06-07 18:05:05 +080041 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070042 test_suites: ["vts"],
Hsin-Yi Chen69295752017-06-07 18:05:05 +080043}
44
45cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070046 name: "binderDriverInterfaceTest",
47 defaults: ["binder_test_defaults"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070048 product_variables: {
49 binder32bit: {
50 cflags: ["-DBINDER_IPC_32BIT=1"],
51 },
52 },
Yifan Hong4e419d82021-04-26 11:32:56 -070053 header_libs: ["libbinder_headers"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070054 srcs: ["binderDriverInterfaceTest.cpp"],
Dan Shieb25b672020-03-26 11:43:04 -070055 test_suites: ["device-tests", "vts"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070056}
57
58cc_test {
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080059 name: "binderLibTest_IPC_32",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070060 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -070061 srcs: ["binderLibTest.cpp"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080062 shared_libs: [
63 "libbinder",
64 "libutils",
65 ],
66 compile_multilib: "32",
Steven Morelandf9f3de22020-05-06 17:14:39 -070067 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080068 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070069 test_suites: ["vts"],
70 require_root: true,
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080071}
72
Steven Morelandcefba612020-11-05 22:57:06 +000073// unit test only, which can run on host and doesn't use /dev/binder
74cc_test {
75 name: "binderParcelTest",
76 host_supported: true,
77 target: {
78 darwin: {
79 enabled: false,
80 },
81 },
82 srcs: ["binderParcelTest.cpp"],
83 shared_libs: [
84 "libbinder",
85 "libutils",
86 ],
87 test_suites: ["general-tests"],
88}
89
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080090cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070091 name: "binderLibTest",
92 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080093 product_variables: {
94 binder32bit: {
95 cflags: ["-DBINDER_IPC_32BIT=1"],
96 },
97 },
98
Dan Willemsen59e086f2016-07-25 17:13:45 -070099 srcs: ["binderLibTest.cpp"],
100 shared_libs: [
101 "libbinder",
102 "libutils",
103 ],
Dan Shieb25b672020-03-26 11:43:04 -0700104 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700105 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700106}
107
Steven Moreland37aff182021-03-26 02:04:16 +0000108aidl_interface {
109 name: "binderRpcTestIface",
110 host_supported: true,
111 unstable: true,
112 srcs: [
113 "IBinderRpcSession.aidl",
114 "IBinderRpcTest.aidl",
115 ],
116 backend: {
117 java: {
118 enabled: false,
119 },
120 },
121}
122
Dan Willemsen59e086f2016-07-25 17:13:45 -0700123cc_test {
Steven Moreland5553ac42020-11-11 02:14:45 +0000124 name: "binderRpcTest",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000125 host_supported: true,
126 target: {
127 darwin: {
128 enabled: false,
129 },
130 },
Steven Moreland37aff182021-03-26 02:04:16 +0000131 defaults: [
132 "binder_test_defaults",
133 "libbinder_ndk_host_user",
134 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000135
136 srcs: [
Steven Moreland5553ac42020-11-11 02:14:45 +0000137 "binderRpcTest.cpp",
138 ],
139 shared_libs: [
140 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000141 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000142 "libbase",
143 "libutils",
144 "libcutils",
145 "liblog",
146 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000147 static_libs: [
148 "binderRpcTestIface-cpp",
149 "binderRpcTestIface-ndk_platform",
150 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000151 test_suites: ["general-tests"],
152 require_root: true,
153}
154
Steven Morelandcda60852021-04-14 23:45:32 +0000155cc_benchmark {
156 name: "binderRpcBenchmark",
157 defaults: ["binder_test_defaults"],
158 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000159 target: {
160 darwin: {
161 enabled: false,
162 },
163 },
Steven Morelandcda60852021-04-14 23:45:32 +0000164 srcs: [
165 "binderRpcBenchmark.cpp",
166 "IBinderRpcBenchmark.aidl",
167 ],
168 shared_libs: [
169 "libbase",
170 "libbinder",
171 "liblog",
172 "libutils",
173 ],
174}
175
Steven Moreland5553ac42020-11-11 02:14:45 +0000176cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700177 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700178 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700179 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700180 shared_libs: [
181 "libbinder",
182 "libutils",
183 ],
184 clang: true,
185 cflags: [
186 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700187 "-Wno-missing-field-initializers",
188 "-Wno-sign-compare",
189 "-O3",
190 ],
191}
Wei Wang78f2a372016-10-20 23:18:17 -0700192
193cc_test {
194 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700195 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700196 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700197 shared_libs: [
198 "libbinder",
199 "libutils",
200 "libbase",
201 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700202 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700203}
Howard Chenc135dbc2017-03-25 17:12:59 +0800204
205cc_test {
206 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700207 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700208 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800209 shared_libs: [
210 "libbinder",
211 "libutils",
212 "libbase",
213 ],
214}
Dan Stozad630e522016-12-01 15:16:31 -0800215
216cc_test {
217 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700218 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700219 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800220
221 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800222 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800223 ],
224
225 cpp_std: "experimental",
226 gnu_extensions: false,
227
228 shared_libs: [
229 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700230 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800231 "liblog",
232 "libutils",
233 ],
Dan Shieb25b672020-03-26 11:43:04 -0700234 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700235 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800236}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700237
Steven Morelandf23dae22020-10-27 19:34:55 +0000238cc_test {
239 name: "binderClearBufTest",
240 defaults: ["binder_test_defaults"],
241 srcs: [
242 "binderClearBufTest.cpp",
243 ],
244
245 shared_libs: [
246 "libbase",
247 "libbinder",
248 "liblog",
249 "libutils",
250 ],
251
252 test_suites: ["general-tests"],
253 require_root: true,
254}
255
Steven Moreland12300a02019-08-02 13:27:15 -0700256aidl_interface {
257 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900258 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700259 srcs: [
260 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700261 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000262 backend: {
263 java: {
264 enabled: false,
265 },
266 },
Steven Moreland12300a02019-08-02 13:27:15 -0700267}
268
Steven Morelanddea3cf92019-07-16 18:06:55 -0700269cc_test {
270 name: "binderStabilityTest",
271 defaults: ["binder_test_defaults"],
272 srcs: [
273 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700274 ],
275
Steven Moreland13f84662020-07-23 21:30:41 +0000276 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700277 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700278 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700279 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700280 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700281 "libutils",
282 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700283 static_libs: [
284 "binderStabilityTestIface-cpp",
285 "binderStabilityTestIface-ndk_platform",
286 ],
287
Steven Moreland13f84662020-07-23 21:30:41 +0000288 test_suites: ["device-tests", "vts"],
Dan Shi302709b2019-09-19 15:28:15 -0700289 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700290}
Steven Moreland042ae822020-05-27 17:45:17 +0000291
292cc_test {
293 name: "binderAllocationLimits",
294 defaults: ["binder_test_defaults"],
295 srcs: ["binderAllocationLimits.cpp"],
296 shared_libs: [
297 "libbinder",
298 "liblog",
299 "libutils",
300 "libutilscallstack",
301 "libbase",
302 ],
303 test_suites: ["device-tests"],
304 require_root: true,
305}
Andy Hung73a14702020-11-24 13:04:46 -0800306
307cc_benchmark {
308 name: "binderParcelBenchmark",
309 defaults: ["binder_test_defaults"],
310 srcs: ["binderParcelBenchmark.cpp"],
311 shared_libs: [
312 "libbase",
313 "libbinder",
314 "liblog",
315 "libutils",
316 ],
317}