blob: 87f1d4535025f6c27664641a68672deb87d94e4a [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
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070017cc_defaults {
18 name: "binder_test_defaults",
19 cflags: [
20 "-Wall",
21 "-Werror",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070022 ],
23}
24
Dan Willemsen59e086f2016-07-25 17:13:45 -070025cc_test {
Hsin-Yi Chen69295752017-06-07 18:05:05 +080026 name: "binderDriverInterfaceTest_IPC_32",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070027 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -070028 srcs: ["binderDriverInterfaceTest.cpp"],
Hsin-Yi Chen69295752017-06-07 18:05:05 +080029 compile_multilib: "32",
Steven Morelandf9f3de22020-05-06 17:14:39 -070030 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chen69295752017-06-07 18:05:05 +080031 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070032 test_suites: ["vts"],
Hsin-Yi Chen69295752017-06-07 18:05:05 +080033}
34
35cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070036 name: "binderDriverInterfaceTest",
37 defaults: ["binder_test_defaults"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070038 product_variables: {
39 binder32bit: {
40 cflags: ["-DBINDER_IPC_32BIT=1"],
41 },
42 },
43
Dan Willemsen59e086f2016-07-25 17:13:45 -070044 srcs: ["binderDriverInterfaceTest.cpp"],
Dan Shieb25b672020-03-26 11:43:04 -070045 test_suites: ["device-tests", "vts"],
Dan Willemsen59e086f2016-07-25 17:13:45 -070046}
47
48cc_test {
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080049 name: "binderLibTest_IPC_32",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -070050 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -070051 srcs: ["binderLibTest.cpp"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080052 shared_libs: [
53 "libbinder",
54 "libutils",
55 ],
56 compile_multilib: "32",
Steven Morelandf9f3de22020-05-06 17:14:39 -070057 multilib: { lib32: { suffix: "" } },
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080058 cflags: ["-DBINDER_IPC_32BIT=1"],
Steven Morelandf9f3de22020-05-06 17:14:39 -070059 test_suites: ["vts"],
60 require_root: true,
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080061}
62
Steven Morelandcefba612020-11-05 22:57:06 +000063// unit test only, which can run on host and doesn't use /dev/binder
64cc_test {
65 name: "binderParcelTest",
66 host_supported: true,
67 target: {
68 darwin: {
69 enabled: false,
70 },
71 },
72 srcs: ["binderParcelTest.cpp"],
73 shared_libs: [
74 "libbinder",
75 "libutils",
76 ],
77 test_suites: ["general-tests"],
78}
79
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080080cc_test {
Steven Morelandc7a30c82019-07-10 13:12:23 -070081 name: "binderLibTest",
82 defaults: ["binder_test_defaults"],
Hsin-Yi Chenec18c022017-07-06 11:40:20 +080083 product_variables: {
84 binder32bit: {
85 cflags: ["-DBINDER_IPC_32BIT=1"],
86 },
87 },
88
Dan Willemsen59e086f2016-07-25 17:13:45 -070089 srcs: ["binderLibTest.cpp"],
90 shared_libs: [
91 "libbinder",
92 "libutils",
93 ],
Dan Shieb25b672020-03-26 11:43:04 -070094 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -070095 require_root: true,
Dan Willemsen59e086f2016-07-25 17:13:45 -070096}
97
98cc_test {
99 name: "binderThroughputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700100 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700101 srcs: ["binderThroughputTest.cpp"],
Dan Willemsen59e086f2016-07-25 17:13:45 -0700102 shared_libs: [
103 "libbinder",
104 "libutils",
105 ],
106 clang: true,
107 cflags: [
108 "-g",
Dan Willemsen59e086f2016-07-25 17:13:45 -0700109 "-Wno-missing-field-initializers",
110 "-Wno-sign-compare",
111 "-O3",
112 ],
113}
Wei Wang78f2a372016-10-20 23:18:17 -0700114
115cc_test {
116 name: "binderTextOutputTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700117 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700118 srcs: ["binderTextOutputTest.cpp"],
Wei Wang78f2a372016-10-20 23:18:17 -0700119 shared_libs: [
120 "libbinder",
121 "libutils",
122 "libbase",
123 ],
Steven Moreland67812c22019-07-10 13:50:40 -0700124 test_suites: ["device-tests"],
Wei Wang78f2a372016-10-20 23:18:17 -0700125}
Howard Chenc135dbc2017-03-25 17:12:59 +0800126
127cc_test {
128 name: "schd-dbg",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700129 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700130 srcs: ["schd-dbg.cpp"],
Howard Chenc135dbc2017-03-25 17:12:59 +0800131 shared_libs: [
132 "libbinder",
133 "libutils",
134 "libbase",
135 ],
136}
Dan Stozad630e522016-12-01 15:16:31 -0800137
138cc_test {
139 name: "binderSafeInterfaceTest",
Chih-Hung Hsiehd1acbbc2017-10-05 13:38:28 -0700140 defaults: ["binder_test_defaults"],
Steven Morelandc7a30c82019-07-10 13:12:23 -0700141 srcs: ["binderSafeInterfaceTest.cpp"],
Dan Stozad630e522016-12-01 15:16:31 -0800142
143 cppflags: [
Colin Cross1383d9f2019-11-06 13:33:40 -0800144 "-Wextra",
Dan Stozad630e522016-12-01 15:16:31 -0800145 ],
146
147 cpp_std: "experimental",
148 gnu_extensions: false,
149
150 shared_libs: [
151 "libbinder",
Dan Stoza2537db72017-04-07 16:32:38 -0700152 "libcutils",
Dan Stozad630e522016-12-01 15:16:31 -0800153 "liblog",
154 "libutils",
155 ],
Dan Shieb25b672020-03-26 11:43:04 -0700156 test_suites: ["device-tests", "vts"],
Dan Shi80ada592019-09-13 09:17:17 -0700157 require_root: true,
Dan Stozad630e522016-12-01 15:16:31 -0800158}
Steven Morelanddea3cf92019-07-16 18:06:55 -0700159
Steven Moreland12300a02019-08-02 13:27:15 -0700160aidl_interface {
161 name: "binderStabilityTestIface",
Jiyong Park701fa1a2020-04-13 12:55:44 +0900162 unstable: true,
Steven Moreland12300a02019-08-02 13:27:15 -0700163 srcs: [
164 "IBinderStabilityTest.aidl",
Steven Moreland12300a02019-08-02 13:27:15 -0700165 ],
166}
167
Steven Morelanddea3cf92019-07-16 18:06:55 -0700168cc_test {
169 name: "binderStabilityTest",
170 defaults: ["binder_test_defaults"],
171 srcs: [
172 "binderStabilityTest.cpp",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700173 ],
174
Steven Moreland13f84662020-07-23 21:30:41 +0000175 // critical that libbinder/libbinder_ndk are shared for VTS
Steven Morelanddea3cf92019-07-16 18:06:55 -0700176 shared_libs: [
Steven Moreland12300a02019-08-02 13:27:15 -0700177 "libbinder_ndk",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700178 "libbinder",
Steven Moreland12300a02019-08-02 13:27:15 -0700179 "liblog",
Steven Morelanddea3cf92019-07-16 18:06:55 -0700180 "libutils",
181 ],
Steven Moreland12300a02019-08-02 13:27:15 -0700182 static_libs: [
183 "binderStabilityTestIface-cpp",
184 "binderStabilityTestIface-ndk_platform",
185 ],
186
Steven Moreland13f84662020-07-23 21:30:41 +0000187 test_suites: ["device-tests", "vts"],
Dan Shi302709b2019-09-19 15:28:15 -0700188 require_root: true,
Steven Morelanddea3cf92019-07-16 18:06:55 -0700189}
Steven Moreland042ae822020-05-27 17:45:17 +0000190
191cc_test {
192 name: "binderAllocationLimits",
193 defaults: ["binder_test_defaults"],
194 srcs: ["binderAllocationLimits.cpp"],
195 shared_libs: [
196 "libbinder",
197 "liblog",
198 "libutils",
199 "libutilscallstack",
200 "libbase",
201 ],
202 test_suites: ["device-tests"],
203 require_root: true,
204}