blob: a44cddf761d614b4a67fa5695493d55cf092c36e [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
107cc_test {
Steven Moreland5553ac42020-11-11 02:14:45 +0000108 name: "binderRpcTest",
109 defaults: ["binder_test_defaults"],
110
111 srcs: [
112 "IBinderRpcSession.aidl",
113 "IBinderRpcTest.aidl",
114 "binderRpcTest.cpp",
115 ],
116 shared_libs: [
117 "libbinder",
118 "libbase",
119 "libutils",
120 "libcutils",
121 "liblog",
122 ],
123 test_suites: ["general-tests"],
124 require_root: true,
125}
126
127cc_test {
Dan Willemsen59e086f2016-07-25 17:13:45 -0700128 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700129 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700130 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700131 shared_libs: [
132 "libbinder",
133 "libutils",
134 ],
135 clang: true,
136 cflags: [
137 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700138 "-Wno-missing-field-initializers",
139 "-Wno-sign-compare",
140 "-O3",
141 ],
142}
Wei Wang78f2a372016-10-20 23:18:17 -0700143
144cc_test {
145 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700146 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700147 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700148 shared_libs: [
149 "libbinder",
150 "libutils",
151 "libbase",
152 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700153 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700154}
Howard Chenc135dbc2017-03-25 17:12:59 +0800155
156cc_test {
157 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700158 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700159 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800160 shared_libs: [
161 "libbinder",
162 "libutils",
163 "libbase",
164 ],
165}
Dan Stozad630e522016-12-01 15:16:31 -0800166
167cc_test {
168 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700169 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700170 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800171
172 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800173 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800174 ],
175
176 cpp_std: "experimental",
177 gnu_extensions: false,
178
179 shared_libs: [
180 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700181 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800182 "liblog",
183 "libutils",
184 ],
Dan Shieb25b672020-03-26 11:43:04 -0700185 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700186 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800187}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700188
Steven Morelandf23dae22020-10-27 19:34:55 +0000189cc_test {
190 name: "binderClearBufTest",
191 defaults: ["binder_test_defaults"],
192 srcs: [
193 "binderClearBufTest.cpp",
194 ],
195
196 shared_libs: [
197 "libbase",
198 "libbinder",
199 "liblog",
200 "libutils",
201 ],
202
203 test_suites: ["general-tests"],
204 require_root: true,
205}
206
Steven Moreland12300a02019-08-02 13:27:15 -0700207aidl_interface {
208 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900209 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700210 srcs: [
211 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700212 ],
213}
214
Steven Morelanddea3cf92019-07-16 18:06:55 -0700215cc_test {
216 name: "binderStabilityTest",
217 defaults: ["binder_test_defaults"],
218 srcs: [
219 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700220 ],
221
Steven Moreland13f84662020-07-23 21:30:41 +0000222 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700223 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700224 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700225 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700226 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700227 "libutils",
228 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700229 static_libs: [
230 "binderStabilityTestIface-cpp",
231 "binderStabilityTestIface-ndk_platform",
232 ],
233
Steven Moreland13f84662020-07-23 21:30:41 +0000234 test_suites: ["device-tests", "vts"],
Dan Shi302709b2019-09-19 15:28:15 -0700235 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700236}
Steven Moreland042ae822020-05-27 17:45:17 +0000237
238cc_test {
239 name: "binderAllocationLimits",
240 defaults: ["binder_test_defaults"],
241 srcs: ["binderAllocationLimits.cpp"],
242 shared_libs: [
243 "libbinder",
244 "liblog",
245 "libutils",
246 "libutilscallstack",
247 "libbase",
248 ],
249 test_suites: ["device-tests"],
250 require_root: true,
251}
Andy Hung73a14702020-11-24 13:04:46 -0800252
253cc_benchmark {
254 name: "binderParcelBenchmark",
255 defaults: ["binder_test_defaults"],
256 srcs: ["binderParcelBenchmark.cpp"],
257 shared_libs: [
258 "libbase",
259 "libbinder",
260 "liblog",
261 "libutils",
262 ],
263}