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: [ |
Yifan Hong | 84bedeb | 2021-04-21 21:37:17 -0700 | [diff] [blame] | 63 | "libbase", |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 64 | "libbinder", |
| 65 | "libutils", |
| 66 | ], |
Yifan Hong | bbd2a0d | 2021-05-07 22:12:23 -0700 | [diff] [blame] | 67 | static_libs: [ |
| 68 | "libgmock", |
| 69 | ], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 70 | compile_multilib: "32", |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 71 | multilib: { lib32: { suffix: "" } }, |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 72 | cflags: ["-DBINDER_IPC_32BIT=1"], |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 73 | test_suites: ["vts"], |
| 74 | require_root: true, |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 75 | } |
| 76 | |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 77 | // unit test only, which can run on host and doesn't use /dev/binder |
| 78 | cc_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 Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 94 | cc_test { |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 95 | name: "binderLibTest", |
| 96 | defaults: ["binder_test_defaults"], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 97 | product_variables: { |
| 98 | binder32bit: { |
| 99 | cflags: ["-DBINDER_IPC_32BIT=1"], |
| 100 | }, |
| 101 | }, |
| 102 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 103 | srcs: ["binderLibTest.cpp"], |
| 104 | shared_libs: [ |
Yifan Hong | 84bedeb | 2021-04-21 21:37:17 -0700 | [diff] [blame] | 105 | "libbase", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 106 | "libbinder", |
| 107 | "libutils", |
| 108 | ], |
Yifan Hong | bbd2a0d | 2021-05-07 22:12:23 -0700 | [diff] [blame] | 109 | static_libs: [ |
| 110 | "libgmock", |
| 111 | ], |
Dan Shi | eb25b67 | 2020-03-26 11:43:04 -0700 | [diff] [blame] | 112 | test_suites: ["device-tests", "vts"], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 113 | require_root: true, |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 114 | } |
| 115 | |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 116 | aidl_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 Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 131 | cc_test { |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 132 | name: "binderRpcTest", |
Steven Moreland | f6ec463 | 2021-04-01 16:20:47 +0000 | [diff] [blame] | 133 | host_supported: true, |
| 134 | target: { |
| 135 | darwin: { |
| 136 | enabled: false, |
| 137 | }, |
Steven Moreland | 1d448af | 2021-04-20 01:05:18 +0000 | [diff] [blame] | 138 | android: { |
| 139 | test_suites: ["vts"], |
| 140 | }, |
Steven Moreland | f6ec463 | 2021-04-01 16:20:47 +0000 | [diff] [blame] | 141 | }, |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 142 | defaults: [ |
| 143 | "binder_test_defaults", |
| 144 | "libbinder_ndk_host_user", |
| 145 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 146 | |
| 147 | srcs: [ |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 148 | "binderRpcTest.cpp", |
| 149 | ], |
| 150 | shared_libs: [ |
| 151 | "libbinder", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 152 | "libbinder_ndk", |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 153 | "libbase", |
| 154 | "libutils", |
| 155 | "libcutils", |
| 156 | "liblog", |
| 157 | ], |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 158 | static_libs: [ |
| 159 | "binderRpcTestIface-cpp", |
| 160 | "binderRpcTestIface-ndk_platform", |
| 161 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 162 | test_suites: ["general-tests"], |
| 163 | require_root: true, |
| 164 | } |
| 165 | |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 166 | cc_benchmark { |
| 167 | name: "binderRpcBenchmark", |
| 168 | defaults: ["binder_test_defaults"], |
| 169 | host_supported: true, |
Steven Moreland | 722b490 | 2021-04-16 16:30:18 +0000 | [diff] [blame] | 170 | target: { |
| 171 | darwin: { |
| 172 | enabled: false, |
| 173 | }, |
| 174 | }, |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 175 | srcs: [ |
| 176 | "binderRpcBenchmark.cpp", |
| 177 | "IBinderRpcBenchmark.aidl", |
| 178 | ], |
| 179 | shared_libs: [ |
| 180 | "libbase", |
| 181 | "libbinder", |
| 182 | "liblog", |
| 183 | "libutils", |
| 184 | ], |
| 185 | } |
| 186 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 187 | cc_test { |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 188 | name: "binderThroughputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 189 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 190 | srcs: ["binderThroughputTest.cpp"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 191 | shared_libs: [ |
| 192 | "libbinder", |
| 193 | "libutils", |
| 194 | ], |
| 195 | clang: true, |
| 196 | cflags: [ |
| 197 | "-g", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 198 | "-Wno-missing-field-initializers", |
| 199 | "-Wno-sign-compare", |
| 200 | "-O3", |
| 201 | ], |
| 202 | } |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 203 | |
| 204 | cc_test { |
| 205 | name: "binderTextOutputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 206 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 207 | srcs: ["binderTextOutputTest.cpp"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 208 | shared_libs: [ |
| 209 | "libbinder", |
| 210 | "libutils", |
| 211 | "libbase", |
| 212 | ], |
Steven Moreland | 67812c2 | 2019-07-10 13:50:40 -0700 | [diff] [blame] | 213 | test_suites: ["device-tests"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 214 | } |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 215 | |
| 216 | cc_test { |
| 217 | name: "schd-dbg", |
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: ["schd-dbg.cpp"], |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 220 | shared_libs: [ |
| 221 | "libbinder", |
| 222 | "libutils", |
| 223 | "libbase", |
| 224 | ], |
| 225 | } |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 226 | |
| 227 | cc_test { |
| 228 | name: "binderSafeInterfaceTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 229 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 230 | srcs: ["binderSafeInterfaceTest.cpp"], |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 231 | |
| 232 | cppflags: [ |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 233 | "-Wextra", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 234 | ], |
| 235 | |
| 236 | cpp_std: "experimental", |
| 237 | gnu_extensions: false, |
| 238 | |
| 239 | shared_libs: [ |
| 240 | "libbinder", |
Dan Stoza | 2537db7 | 2017-04-07 16:32:38 -0700 | [diff] [blame] | 241 | "libcutils", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 242 | "liblog", |
| 243 | "libutils", |
| 244 | ], |
Dan Shi | eb25b67 | 2020-03-26 11:43:04 -0700 | [diff] [blame] | 245 | test_suites: ["device-tests", "vts"], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 246 | require_root: true, |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 247 | } |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 248 | |
Steven Moreland | f23dae2 | 2020-10-27 19:34:55 +0000 | [diff] [blame] | 249 | cc_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 Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 267 | aidl_interface { |
| 268 | name: "binderStabilityTestIface", |
Jiyong Park | 701fa1a | 2020-04-13 12:55:44 +0900 | [diff] [blame] | 269 | unstable: true, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 270 | srcs: [ |
| 271 | "IBinderStabilityTest.aidl", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 272 | ], |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 273 | backend: { |
| 274 | java: { |
| 275 | enabled: false, |
| 276 | }, |
| 277 | }, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 278 | } |
| 279 | |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 280 | cc_test { |
| 281 | name: "binderStabilityTest", |
| 282 | defaults: ["binder_test_defaults"], |
| 283 | srcs: [ |
| 284 | "binderStabilityTest.cpp", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 285 | ], |
| 286 | |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 287 | // critical that libbinder/libbinder_ndk are shared for VTS |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 288 | shared_libs: [ |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 289 | "libbinder_ndk", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 290 | "libbinder", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 291 | "liblog", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 292 | "libutils", |
| 293 | ], |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 294 | static_libs: [ |
| 295 | "binderStabilityTestIface-cpp", |
| 296 | "binderStabilityTestIface-ndk_platform", |
| 297 | ], |
| 298 | |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 299 | test_suites: ["device-tests", "vts"], |
Dan Shi | 302709b | 2019-09-19 15:28:15 -0700 | [diff] [blame] | 300 | require_root: true, |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 301 | } |
Steven Moreland | 042ae82 | 2020-05-27 17:45:17 +0000 | [diff] [blame] | 302 | |
| 303 | cc_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 Hung | 73a1470 | 2020-11-24 13:04:46 -0800 | [diff] [blame] | 317 | |
| 318 | cc_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 | } |