blob: 9cf433d6fddb2fedb828e8e0b88bfcef9a1860d9 [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: [
Yifan Hong84bedeb2021-04-21 21:37:17 -070063 "libbase",
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080064 "libbinder",
65 "libutils",
66 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -070067 static_libs: [
68 "libgmock",
69 ],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080070 compile_multilib: "32",
Steven Morelandf9f3de22020-05-06 17:14:39 -070071 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080072 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070073 test_suites: ["vts"],
74 require_root: true,
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080075}
76
Steven Morelandcefba612020-11-05 22:57:06 +000077// unit test only, which can run on host and doesn't use /dev/binder
78cc_test {
79 name: "binderParcelTest",
80 host_supported: true,
81 target: {
82 darwin: {
83 enabled: false,
84 },
85 },
86 srcs: ["binderParcelTest.cpp"],
87 shared_libs: [
88 "libbinder",
89 "libutils",
90 ],
91 test_suites: ["general-tests"],
92}
93
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080094cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070095 name: "binderLibTest",
96 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080097 product_variables: {
98 binder32bit: {
99 cflags: ["-DBINDER_IPC_32BIT=1"],
100 },
101 },
102
Dan Willemsen59e086f2016-07-25 17:13:45 -0700103 srcs: ["binderLibTest.cpp"],
104 shared_libs: [
Yifan Hong84bedeb2021-04-21 21:37:17 -0700105 "libbase",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700106 "libbinder",
107 "libutils",
108 ],
Yifan Hongbbd2a0d2021-05-07 22:12:23 -0700109 static_libs: [
110 "libgmock",
111 ],
Dan Shieb25b672020-03-26 11:43:04 -0700112 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700113 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -0700114}
115
Steven Moreland37aff182021-03-26 02:04:16 +0000116aidl_interface {
117 name: "binderRpcTestIface",
118 host_supported: true,
119 unstable: true,
120 srcs: [
121 "IBinderRpcSession.aidl",
122 "IBinderRpcTest.aidl",
123 ],
124 backend: {
125 java: {
126 enabled: false,
127 },
128 },
129}
130
Dan Willemsen59e086f2016-07-25 17:13:45 -0700131cc_test {
Steven Moreland5553ac42020-11-11 02:14:45 +0000132 name: "binderRpcTest",
Steven Morelandf6ec4632021-04-01 16:20:47 +0000133 host_supported: true,
134 target: {
135 darwin: {
136 enabled: false,
137 },
Steven Moreland1d448af2021-04-20 01:05:18 +0000138 android: {
139 test_suites: ["vts"],
140 },
Steven Morelandf6ec4632021-04-01 16:20:47 +0000141 },
Steven Moreland37aff182021-03-26 02:04:16 +0000142 defaults: [
143 "binder_test_defaults",
144 "libbinder_ndk_host_user",
145 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000146
147 srcs: [
Steven Moreland5553ac42020-11-11 02:14:45 +0000148 "binderRpcTest.cpp",
149 ],
150 shared_libs: [
151 "libbinder",
Steven Moreland37aff182021-03-26 02:04:16 +0000152 "libbinder_ndk",
Steven Moreland5553ac42020-11-11 02:14:45 +0000153 "libbase",
154 "libutils",
155 "libcutils",
156 "liblog",
157 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000158 static_libs: [
159 "binderRpcTestIface-cpp",
160 "binderRpcTestIface-ndk_platform",
161 ],
Steven Moreland5553ac42020-11-11 02:14:45 +0000162 test_suites: ["general-tests"],
163 require_root: true,
164}
165
Steven Morelandcda60852021-04-14 23:45:32 +0000166cc_benchmark {
167 name: "binderRpcBenchmark",
168 defaults: ["binder_test_defaults"],
169 host_supported: true,
Steven Moreland722b4902021-04-16 16:30:18 +0000170 target: {
171 darwin: {
172 enabled: false,
173 },
174 },
Steven Morelandcda60852021-04-14 23:45:32 +0000175 srcs: [
176 "binderRpcBenchmark.cpp",
177 "IBinderRpcBenchmark.aidl",
178 ],
179 shared_libs: [
180 "libbase",
181 "libbinder",
182 "liblog",
183 "libutils",
184 ],
185}
186
Steven Moreland5553ac42020-11-11 02:14:45 +0000187cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700188 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700189 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700190 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700191 shared_libs: [
192 "libbinder",
193 "libutils",
194 ],
195 clang: true,
196 cflags: [
197 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700198 "-Wno-missing-field-initializers",
199 "-Wno-sign-compare",
200 "-O3",
201 ],
202}
Wei Wang78f2a372016-10-20 23:18:17 -0700203
204cc_test {
205 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700206 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700207 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700208 shared_libs: [
209 "libbinder",
210 "libutils",
211 "libbase",
212 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700213 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700214}
Howard Chenc135dbc2017-03-25 17:12:59 +0800215
216cc_test {
217 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700218 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700219 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800220 shared_libs: [
221 "libbinder",
222 "libutils",
223 "libbase",
224 ],
225}
Dan Stozad630e522016-12-01 15:16:31 -0800226
227cc_test {
228 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700229 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700230 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800231
232 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800233 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800234 ],
235
236 cpp_std: "experimental",
237 gnu_extensions: false,
238
239 shared_libs: [
240 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700241 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800242 "liblog",
243 "libutils",
244 ],
Dan Shieb25b672020-03-26 11:43:04 -0700245 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700246 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800247}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700248
Steven Morelandf23dae22020-10-27 19:34:55 +0000249cc_test {
250 name: "binderClearBufTest",
251 defaults: ["binder_test_defaults"],
252 srcs: [
253 "binderClearBufTest.cpp",
254 ],
255
256 shared_libs: [
257 "libbase",
258 "libbinder",
259 "liblog",
260 "libutils",
261 ],
262
263 test_suites: ["general-tests"],
264 require_root: true,
265}
266
Steven Moreland12300a02019-08-02 13:27:15 -0700267aidl_interface {
268 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900269 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700270 srcs: [
271 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700272 ],
Steven Moreland37aff182021-03-26 02:04:16 +0000273 backend: {
274 java: {
275 enabled: false,
276 },
277 },
Steven Moreland12300a02019-08-02 13:27:15 -0700278}
279
Steven Morelanddea3cf92019-07-16 18:06:55 -0700280cc_test {
281 name: "binderStabilityTest",
282 defaults: ["binder_test_defaults"],
283 srcs: [
284 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700285 ],
286
Steven Moreland13f84662020-07-23 21:30:41 +0000287 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700288 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700289 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700290 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700291 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700292 "libutils",
293 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700294 static_libs: [
295 "binderStabilityTestIface-cpp",
296 "binderStabilityTestIface-ndk_platform",
297 ],
298
Steven Moreland13f84662020-07-23 21:30:41 +0000299 test_suites: ["device-tests", "vts"],
Dan Shi302709b2019-09-19 15:28:15 -0700300 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700301}
Steven Moreland042ae822020-05-27 17:45:17 +0000302
303cc_test {
304 name: "binderAllocationLimits",
305 defaults: ["binder_test_defaults"],
306 srcs: ["binderAllocationLimits.cpp"],
307 shared_libs: [
308 "libbinder",
309 "liblog",
310 "libutils",
311 "libutilscallstack",
312 "libbase",
313 ],
314 test_suites: ["device-tests"],
315 require_root: true,
316}
Andy Hung73a14702020-11-24 13:04:46 -0800317
318cc_benchmark {
319 name: "binderParcelBenchmark",
320 defaults: ["binder_test_defaults"],
321 srcs: ["binderParcelBenchmark.cpp"],
322 shared_libs: [
323 "libbase",
324 "libbinder",
325 "liblog",
326 "libutils",
327 ],
328}