blob: ec231b2345751dbbe1d1e49db6735e6fbf216c32 [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 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -070066 static_libs: [
67 "libgmock",
68 ],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080069 compile_multilib: "32",
Steven Morelandf9f3de22020-05-06 17:14:39 -070070 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080071 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070072 test_suites: ["vts"],
73 require_root: true,
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080074}
75
Steven Morelandcefba612020-11-05 22:57:06 +000076// unit test only, which can run on host and doesn't use /dev/binder
77cc_test {
78 name: "binderParcelTest",
79 host_supported: true,
80 target: {
81 darwin: {
82 enabled: false,
83 },
84 },
85 srcs: ["binderParcelTest.cpp"],
86 shared_libs: [
87 "libbinder",
88 "libutils",
89 ],
90 test_suites: ["general-tests"],
91}
92
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080093cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070094 name: "binderLibTest",
95 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080096 product_variables: {
97 binder32bit: {
98 cflags: ["-DBINDER_IPC_32BIT=1"],
99 },
100 },
101
Dan Willemsen59e086f2016-07-25 17:13:45 -0700102 srcs: ["binderLibTest.cpp"],
103 shared_libs: [
104 "libbinder",
105 "libutils",
106 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700107 static_libs: [
108 "libgmock",
109 ],
Dan Shieb25b672020-03-26 11:43:04 -0700110 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700111 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700112}
113
Steven Moreland37aff182021-03-26 02:04:16 +0000114aidl_interface {
115 name: "binderRpcTestIface",
116 host_supported: true,
117 unstable: true,
118 srcs: [
119 "IBinderRpcSession.aidl",
120 "IBinderRpcTest.aidl",
121 ],
122 backend: {
123 java: {
124 enabled: false,
125 },
126 },
127}
128
Dan Willemsen59e086f2016-07-25 17:13:45 -0700129cc_test {
Steven Moreland5553ac42020-11-11 02:14:45 +0000130 name: "binderRpcTest",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000131 host_supported: true,
132 target: {
133 darwin: {
134 enabled: false,
135 },
136 },
Steven Moreland37aff182021-03-26 02:04:16 +0000137 defaults: [
138 "binder_test_defaults",
139 "libbinder_ndk_host_user",
140 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000141
142 srcs: [
Steven Moreland5553ac42020-11-11 02:14:45 +0000143 "binderRpcTest.cpp",
144 ],
145 shared_libs: [
146 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000147 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000148 "libbase",
149 "libutils",
150 "libcutils",
151 "liblog",
152 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000153 static_libs: [
154 "binderRpcTestIface-cpp",
155 "binderRpcTestIface-ndk_platform",
156 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000157 test_suites: ["general-tests"],
158 require_root: true,
159}
160
Steven Morelandcda60852021-04-14 23:45:32 +0000161cc_benchmark {
162 name: "binderRpcBenchmark",
163 defaults: ["binder_test_defaults"],
164 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000165 target: {
166 darwin: {
167 enabled: false,
168 },
169 },
Steven Morelandcda60852021-04-14 23:45:32 +0000170 srcs: [
171 "binderRpcBenchmark.cpp",
172 "IBinderRpcBenchmark.aidl",
173 ],
174 shared_libs: [
175 "libbase",
176 "libbinder",
177 "liblog",
178 "libutils",
179 ],
180}
181
Steven Moreland5553ac42020-11-11 02:14:45 +0000182cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700183 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700184 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700185 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700186 shared_libs: [
187 "libbinder",
188 "libutils",
189 ],
190 clang: true,
191 cflags: [
192 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700193 "-Wno-missing-field-initializers",
194 "-Wno-sign-compare",
195 "-O3",
196 ],
197}
Wei Wang78f2a372016-10-20 23:18:17 -0700198
199cc_test {
200 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700201 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700202 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700203 shared_libs: [
204 "libbinder",
205 "libutils",
206 "libbase",
207 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700208 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700209}
Howard Chenc135dbc2017-03-25 17:12:59 +0800210
211cc_test {
212 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700213 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700214 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800215 shared_libs: [
216 "libbinder",
217 "libutils",
218 "libbase",
219 ],
220}
Dan Stozad630e522016-12-01 15:16:31 -0800221
222cc_test {
223 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700224 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700225 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800226
227 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800228 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800229 ],
230
231 cpp_std: "experimental",
232 gnu_extensions: false,
233
234 shared_libs: [
235 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700236 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800237 "liblog",
238 "libutils",
239 ],
Dan Shieb25b672020-03-26 11:43:04 -0700240 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700241 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800242}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700243
Steven Morelandf23dae22020-10-27 19:34:55 +0000244cc_test {
245 name: "binderClearBufTest",
246 defaults: ["binder_test_defaults"],
247 srcs: [
248 "binderClearBufTest.cpp",
249 ],
250
251 shared_libs: [
252 "libbase",
253 "libbinder",
254 "liblog",
255 "libutils",
256 ],
257
258 test_suites: ["general-tests"],
259 require_root: true,
260}
261
Steven Moreland12300a02019-08-02 13:27:15 -0700262aidl_interface {
263 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900264 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700265 srcs: [
266 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700267 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000268 backend: {
269 java: {
270 enabled: false,
271 },
272 },
Steven Moreland12300a02019-08-02 13:27:15 -0700273}
274
Steven Morelanddea3cf92019-07-16 18:06:55 -0700275cc_test {
276 name: "binderStabilityTest",
277 defaults: ["binder_test_defaults"],
278 srcs: [
279 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700280 ],
281
Steven Moreland13f84662020-07-23 21:30:41 +0000282 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700283 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700284 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700285 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700286 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700287 "libutils",
288 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700289 static_libs: [
290 "binderStabilityTestIface-cpp",
291 "binderStabilityTestIface-ndk_platform",
292 ],
293
Steven Moreland13f84662020-07-23 21:30:41 +0000294 test_suites: ["device-tests", "vts"],
Dan Shi302709b2019-09-19 15:28:15 -0700295 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700296}
Steven Moreland042ae822020-05-27 17:45:17 +0000297
298cc_test {
299 name: "binderAllocationLimits",
300 defaults: ["binder_test_defaults"],
301 srcs: ["binderAllocationLimits.cpp"],
302 shared_libs: [
303 "libbinder",
304 "liblog",
305 "libutils",
306 "libutilscallstack",
307 "libbase",
308 ],
309 test_suites: ["device-tests"],
310 require_root: true,
311}
Andy Hung73a14702020-11-24 13:04:46 -0800312
313cc_benchmark {
314 name: "binderParcelBenchmark",
315 defaults: ["binder_test_defaults"],
316 srcs: ["binderParcelBenchmark.cpp"],
317 shared_libs: [
318 "libbase",
319 "libbinder",
320 "liblog",
321 "libutils",
322 ],
323}