Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 1 | // |
| 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 Badour | 3c53823 | 2021-02-12 21:26:48 -0800 | [diff] [blame] | 17 | package { |
| 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 Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 26 | cc_defaults { |
| 27 | name: "binder_test_defaults", |
| 28 | cflags: [ |
| 29 | "-Wall", |
| 30 | "-Werror", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 31 | ], |
| 32 | } |
| 33 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 34 | cc_test { |
Hsin-Yi Chen | 6929575 | 2017-06-07 18:05:05 +0800 | [diff] [blame] | 35 | name: "binderDriverInterfaceTest_IPC_32", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 36 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 37 | srcs: ["binderDriverInterfaceTest.cpp"], |
Yifan Hong | 4e419d8 | 2021-04-26 11:32:56 -0700 | [diff] [blame^] | 38 | header_libs: ["libbinder_headers"], |
Hsin-Yi Chen | 6929575 | 2017-06-07 18:05:05 +0800 | [diff] [blame] | 39 | compile_multilib: "32", |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 40 | multilib: { lib32: { suffix: "" } }, |
Hsin-Yi Chen | 6929575 | 2017-06-07 18:05:05 +0800 | [diff] [blame] | 41 | cflags: ["-DBINDER_IPC_32BIT=1"], |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 42 | test_suites: ["vts"], |
Hsin-Yi Chen | 6929575 | 2017-06-07 18:05:05 +0800 | [diff] [blame] | 43 | } |
| 44 | |
| 45 | cc_test { |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 46 | name: "binderDriverInterfaceTest", |
| 47 | defaults: ["binder_test_defaults"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 48 | product_variables: { |
| 49 | binder32bit: { |
| 50 | cflags: ["-DBINDER_IPC_32BIT=1"], |
| 51 | }, |
| 52 | }, |
Yifan Hong | 4e419d8 | 2021-04-26 11:32:56 -0700 | [diff] [blame^] | 53 | header_libs: ["libbinder_headers"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 54 | srcs: ["binderDriverInterfaceTest.cpp"], |
Dan Shi | eb25b67 | 2020-03-26 11:43:04 -0700 | [diff] [blame] | 55 | test_suites: ["device-tests", "vts"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | cc_test { |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 59 | name: "binderLibTest_IPC_32", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 60 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 61 | srcs: ["binderLibTest.cpp"], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 62 | shared_libs: [ |
| 63 | "libbinder", |
| 64 | "libutils", |
| 65 | ], |
| 66 | compile_multilib: "32", |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 67 | multilib: { lib32: { suffix: "" } }, |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 68 | cflags: ["-DBINDER_IPC_32BIT=1"], |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 69 | test_suites: ["vts"], |
| 70 | require_root: true, |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 71 | } |
| 72 | |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 73 | // unit test only, which can run on host and doesn't use /dev/binder |
| 74 | cc_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 Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 90 | cc_test { |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 91 | name: "binderLibTest", |
| 92 | defaults: ["binder_test_defaults"], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 93 | product_variables: { |
| 94 | binder32bit: { |
| 95 | cflags: ["-DBINDER_IPC_32BIT=1"], |
| 96 | }, |
| 97 | }, |
| 98 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 99 | srcs: ["binderLibTest.cpp"], |
| 100 | shared_libs: [ |
| 101 | "libbinder", |
| 102 | "libutils", |
| 103 | ], |
Dan Shi | eb25b67 | 2020-03-26 11:43:04 -0700 | [diff] [blame] | 104 | test_suites: ["device-tests", "vts"], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 105 | require_root: true, |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 106 | } |
| 107 | |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 108 | aidl_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 Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 123 | cc_test { |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 124 | name: "binderRpcTest", |
Steven Moreland | f6ec463 | 2021-04-01 16:20:47 +0000 | [diff] [blame] | 125 | host_supported: true, |
| 126 | target: { |
| 127 | darwin: { |
| 128 | enabled: false, |
| 129 | }, |
| 130 | }, |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 131 | defaults: [ |
| 132 | "binder_test_defaults", |
| 133 | "libbinder_ndk_host_user", |
| 134 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 135 | |
| 136 | srcs: [ |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 137 | "binderRpcTest.cpp", |
| 138 | ], |
| 139 | shared_libs: [ |
| 140 | "libbinder", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 141 | "libbinder_ndk", |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 142 | "libbase", |
| 143 | "libutils", |
| 144 | "libcutils", |
| 145 | "liblog", |
| 146 | ], |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 147 | static_libs: [ |
| 148 | "binderRpcTestIface-cpp", |
| 149 | "binderRpcTestIface-ndk_platform", |
| 150 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 151 | test_suites: ["general-tests"], |
| 152 | require_root: true, |
| 153 | } |
| 154 | |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 155 | cc_benchmark { |
| 156 | name: "binderRpcBenchmark", |
| 157 | defaults: ["binder_test_defaults"], |
| 158 | host_supported: true, |
Steven Moreland | 722b490 | 2021-04-16 16:30:18 +0000 | [diff] [blame] | 159 | target: { |
| 160 | darwin: { |
| 161 | enabled: false, |
| 162 | }, |
| 163 | }, |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 164 | srcs: [ |
| 165 | "binderRpcBenchmark.cpp", |
| 166 | "IBinderRpcBenchmark.aidl", |
| 167 | ], |
| 168 | shared_libs: [ |
| 169 | "libbase", |
| 170 | "libbinder", |
| 171 | "liblog", |
| 172 | "libutils", |
| 173 | ], |
| 174 | } |
| 175 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 176 | cc_test { |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 177 | name: "binderThroughputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 178 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 179 | srcs: ["binderThroughputTest.cpp"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 180 | shared_libs: [ |
| 181 | "libbinder", |
| 182 | "libutils", |
| 183 | ], |
| 184 | clang: true, |
| 185 | cflags: [ |
| 186 | "-g", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 187 | "-Wno-missing-field-initializers", |
| 188 | "-Wno-sign-compare", |
| 189 | "-O3", |
| 190 | ], |
| 191 | } |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 192 | |
| 193 | cc_test { |
| 194 | name: "binderTextOutputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 195 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 196 | srcs: ["binderTextOutputTest.cpp"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 197 | shared_libs: [ |
| 198 | "libbinder", |
| 199 | "libutils", |
| 200 | "libbase", |
| 201 | ], |
Steven Moreland | 67812c2 | 2019-07-10 13:50:40 -0700 | [diff] [blame] | 202 | test_suites: ["device-tests"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 203 | } |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 204 | |
| 205 | cc_test { |
| 206 | name: "schd-dbg", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 207 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 208 | srcs: ["schd-dbg.cpp"], |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 209 | shared_libs: [ |
| 210 | "libbinder", |
| 211 | "libutils", |
| 212 | "libbase", |
| 213 | ], |
| 214 | } |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 215 | |
| 216 | cc_test { |
| 217 | name: "binderSafeInterfaceTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 218 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 219 | srcs: ["binderSafeInterfaceTest.cpp"], |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 220 | |
| 221 | cppflags: [ |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 222 | "-Wextra", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 223 | ], |
| 224 | |
| 225 | cpp_std: "experimental", |
| 226 | gnu_extensions: false, |
| 227 | |
| 228 | shared_libs: [ |
| 229 | "libbinder", |
Dan Stoza | 2537db7 | 2017-04-07 16:32:38 -0700 | [diff] [blame] | 230 | "libcutils", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 231 | "liblog", |
| 232 | "libutils", |
| 233 | ], |
Dan Shi | eb25b67 | 2020-03-26 11:43:04 -0700 | [diff] [blame] | 234 | test_suites: ["device-tests", "vts"], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 235 | require_root: true, |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 236 | } |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 237 | |
Steven Moreland | f23dae2 | 2020-10-27 19:34:55 +0000 | [diff] [blame] | 238 | cc_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 Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 256 | aidl_interface { |
| 257 | name: "binderStabilityTestIface", |
Jiyong Park | 701fa1a | 2020-04-13 12:55:44 +0900 | [diff] [blame] | 258 | unstable: true, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 259 | srcs: [ |
| 260 | "IBinderStabilityTest.aidl", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 261 | ], |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 262 | backend: { |
| 263 | java: { |
| 264 | enabled: false, |
| 265 | }, |
| 266 | }, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 267 | } |
| 268 | |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 269 | cc_test { |
| 270 | name: "binderStabilityTest", |
| 271 | defaults: ["binder_test_defaults"], |
| 272 | srcs: [ |
| 273 | "binderStabilityTest.cpp", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 274 | ], |
| 275 | |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 276 | // critical that libbinder/libbinder_ndk are shared for VTS |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 277 | shared_libs: [ |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 278 | "libbinder_ndk", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 279 | "libbinder", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 280 | "liblog", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 281 | "libutils", |
| 282 | ], |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 283 | static_libs: [ |
| 284 | "binderStabilityTestIface-cpp", |
| 285 | "binderStabilityTestIface-ndk_platform", |
| 286 | ], |
| 287 | |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 288 | test_suites: ["device-tests", "vts"], |
Dan Shi | 302709b | 2019-09-19 15:28:15 -0700 | [diff] [blame] | 289 | require_root: true, |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 290 | } |
Steven Moreland | 042ae82 | 2020-05-27 17:45:17 +0000 | [diff] [blame] | 291 | |
| 292 | cc_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 Hung | 73a1470 | 2020-11-24 13:04:46 -0800 | [diff] [blame] | 306 | |
| 307 | cc_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 | } |