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