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