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 | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 40 | multilib: { |
| 41 | lib32: { |
| 42 | suffix: "", |
| 43 | }, |
| 44 | }, |
Hsin-Yi Chen | 6929575 | 2017-06-07 18:05:05 +0800 | [diff] [blame] | 45 | cflags: ["-DBINDER_IPC_32BIT=1"], |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 46 | test_suites: ["vts"], |
Hsin-Yi Chen | 6929575 | 2017-06-07 18:05:05 +0800 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | cc_test { |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 50 | name: "binderDriverInterfaceTest", |
| 51 | defaults: ["binder_test_defaults"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 52 | product_variables: { |
| 53 | binder32bit: { |
| 54 | cflags: ["-DBINDER_IPC_32BIT=1"], |
| 55 | }, |
| 56 | }, |
Yifan Hong | 4e419d8 | 2021-04-26 11:32:56 -0700 | [diff] [blame] | 57 | header_libs: ["libbinder_headers"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 58 | srcs: ["binderDriverInterfaceTest.cpp"], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 59 | test_suites: [ |
| 60 | "device-tests", |
| 61 | "vts", |
| 62 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 63 | } |
| 64 | |
| 65 | cc_test { |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 66 | name: "binderLibTest_IPC_32", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 67 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 68 | srcs: ["binderLibTest.cpp"], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 69 | shared_libs: [ |
Yifan Hong | 84bedeb | 2021-04-21 21:37:17 -0700 | [diff] [blame] | 70 | "libbase", |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 71 | "libbinder", |
Yifan Hong | 8b89085 | 2021-06-10 13:44:09 -0700 | [diff] [blame] | 72 | "liblog", |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 73 | "libutils", |
| 74 | ], |
Yifan Hong | bbd2a0d | 2021-05-07 22:12:23 -0700 | [diff] [blame] | 75 | static_libs: [ |
| 76 | "libgmock", |
| 77 | ], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 78 | compile_multilib: "32", |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 79 | multilib: { |
| 80 | lib32: { |
| 81 | suffix: "", |
| 82 | }, |
| 83 | }, |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 84 | cflags: ["-DBINDER_IPC_32BIT=1"], |
Steven Moreland | f9f3de2 | 2020-05-06 17:14:39 -0700 | [diff] [blame] | 85 | test_suites: ["vts"], |
| 86 | require_root: true, |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 87 | } |
| 88 | |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 89 | // unit test only, which can run on host and doesn't use /dev/binder |
| 90 | cc_test { |
Steven Moreland | 2831860 | 2021-06-25 01:16:29 +0000 | [diff] [blame] | 91 | name: "binderUnitTest", |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 92 | host_supported: true, |
| 93 | target: { |
| 94 | darwin: { |
| 95 | enabled: false, |
| 96 | }, |
| 97 | }, |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 98 | srcs: [ |
| 99 | "binderParcelUnitTest.cpp", |
| 100 | "binderBinderUnitTest.cpp", |
Steven Moreland | cf37369 | 2022-01-21 23:55:15 +0000 | [diff] [blame] | 101 | "binderStatusUnitTest.cpp", |
Atneya Nair | 7ade4f4 | 2022-02-07 18:16:48 -0500 | [diff] [blame] | 102 | "binderMemoryHeapBaseUnitTest.cpp", |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 103 | ], |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 104 | shared_libs: [ |
| 105 | "libbinder", |
Steven Moreland | f80809b | 2021-10-07 18:09:20 -0700 | [diff] [blame] | 106 | "libcutils", |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 107 | "libutils", |
| 108 | ], |
| 109 | test_suites: ["general-tests"], |
| 110 | } |
| 111 | |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 112 | cc_test { |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 113 | name: "binderLibTest", |
| 114 | defaults: ["binder_test_defaults"], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 115 | product_variables: { |
| 116 | binder32bit: { |
| 117 | cflags: ["-DBINDER_IPC_32BIT=1"], |
| 118 | }, |
| 119 | }, |
| 120 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 121 | srcs: ["binderLibTest.cpp"], |
| 122 | shared_libs: [ |
Yifan Hong | 84bedeb | 2021-04-21 21:37:17 -0700 | [diff] [blame] | 123 | "libbase", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 124 | "libbinder", |
Yifan Hong | 8b89085 | 2021-06-10 13:44:09 -0700 | [diff] [blame] | 125 | "liblog", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 126 | "libutils", |
| 127 | ], |
Yifan Hong | bbd2a0d | 2021-05-07 22:12:23 -0700 | [diff] [blame] | 128 | static_libs: [ |
| 129 | "libgmock", |
| 130 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 131 | test_suites: [ |
| 132 | "device-tests", |
| 133 | "vts", |
| 134 | ], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 135 | require_root: true, |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 136 | } |
| 137 | |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 138 | aidl_interface { |
| 139 | name: "binderRpcTestIface", |
| 140 | host_supported: true, |
| 141 | unstable: true, |
| 142 | srcs: [ |
Yifan Hong | 1deca4b | 2021-09-10 16:16:44 -0700 | [diff] [blame] | 143 | "BinderRpcTestClientInfo.aidl", |
| 144 | "BinderRpcTestServerInfo.aidl", |
Steven Moreland | 659416d | 2021-05-11 00:47:50 +0000 | [diff] [blame] | 145 | "IBinderRpcCallback.aidl", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 146 | "IBinderRpcSession.aidl", |
| 147 | "IBinderRpcTest.aidl", |
Yifan Hong | 1deca4b | 2021-09-10 16:16:44 -0700 | [diff] [blame] | 148 | "ParcelableCertificateData.aidl", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 149 | ], |
| 150 | backend: { |
| 151 | java: { |
| 152 | enabled: false, |
| 153 | }, |
| 154 | }, |
| 155 | } |
| 156 | |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 157 | cc_library_static { |
| 158 | name: "libbinder_tls_test_utils", |
| 159 | host_supported: true, |
| 160 | target: { |
| 161 | darwin: { |
| 162 | enabled: false, |
| 163 | }, |
| 164 | }, |
| 165 | defaults: [ |
| 166 | "binder_test_defaults", |
| 167 | "libbinder_tls_shared_deps", |
| 168 | ], |
| 169 | shared_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 170 | "libbase", |
| 171 | "liblog", |
| 172 | ], |
| 173 | static_libs: [ |
| 174 | "libbinder_tls_static", |
| 175 | ], |
| 176 | srcs: [ |
| 177 | "RpcTlsTestUtils.cpp", |
| 178 | ], |
| 179 | export_include_dirs: [ |
| 180 | "include_tls_test_utils", |
| 181 | ], |
| 182 | visibility: [ |
| 183 | ":__subpackages__", |
| 184 | ], |
| 185 | } |
| 186 | |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame^] | 187 | cc_defaults { |
| 188 | name: "binderRpcTest_defaults", |
Steven Moreland | f6ec463 | 2021-04-01 16:20:47 +0000 | [diff] [blame] | 189 | host_supported: true, |
| 190 | target: { |
| 191 | darwin: { |
| 192 | enabled: false, |
| 193 | }, |
Steven Moreland | 1d448af | 2021-04-20 01:05:18 +0000 | [diff] [blame] | 194 | android: { |
| 195 | test_suites: ["vts"], |
| 196 | }, |
Steven Moreland | f6ec463 | 2021-04-01 16:20:47 +0000 | [diff] [blame] | 197 | }, |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 198 | defaults: [ |
| 199 | "binder_test_defaults", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 200 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 201 | |
| 202 | srcs: [ |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 203 | "binderRpcTest.cpp", |
| 204 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame^] | 205 | |
| 206 | static_libs: [ |
| 207 | "libbinder_tls_static", |
| 208 | "libbinder_tls_test_utils", |
| 209 | "binderRpcTestIface-cpp", |
| 210 | "binderRpcTestIface-ndk", |
| 211 | ], |
| 212 | |
| 213 | test_suites: ["general-tests"], |
| 214 | require_root: true, |
| 215 | } |
| 216 | |
| 217 | cc_test { |
| 218 | name: "binderRpcTest", |
| 219 | defaults: [ |
| 220 | "binderRpcTest_defaults", |
| 221 | "libbinder_tls_shared_deps", |
| 222 | ], |
| 223 | |
| 224 | cflags: [ |
| 225 | "-DBINDER_WITH_KERNEL_IPC", |
| 226 | ], |
| 227 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 228 | shared_libs: [ |
| 229 | "libbinder", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 230 | "libbinder_ndk", |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 231 | "libbase", |
| 232 | "libutils", |
| 233 | "libcutils", |
| 234 | "liblog", |
| 235 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame^] | 236 | } |
| 237 | |
| 238 | cc_defaults { |
| 239 | name: "binderRpcTest_static_defaults", |
| 240 | |
| 241 | shared_libs: [ |
| 242 | "libutils", |
| 243 | // libcrypto_static is not visible to this module |
| 244 | "libcrypto", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 245 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame^] | 246 | static_libs: [ |
| 247 | "libbase", |
| 248 | "libcutils", |
| 249 | "liblog", |
| 250 | "libssl", |
| 251 | ], |
| 252 | |
| 253 | cflags: [ |
| 254 | // Disable tests that require shared libraries, |
| 255 | // e.g., libbinder.so or libbinder_ndk.so |
| 256 | "-DBINDER_TEST_NO_SHARED_LIBS", |
| 257 | ], |
| 258 | } |
| 259 | |
| 260 | cc_test { |
| 261 | name: "binderRpcTestNoKernel", |
| 262 | defaults: [ |
| 263 | "binderRpcTest_defaults", |
| 264 | "binderRpcTest_static_defaults", |
| 265 | ], |
| 266 | static_libs: [ |
| 267 | "libbinder_rpc_no_kernel", |
| 268 | ], |
| 269 | } |
| 270 | |
| 271 | cc_test { |
| 272 | name: "binderRpcTestSingleThreaded", |
| 273 | defaults: [ |
| 274 | "binderRpcTest_defaults", |
| 275 | "binderRpcTest_static_defaults", |
| 276 | ], |
| 277 | cflags: [ |
| 278 | "-DBINDER_RPC_SINGLE_THREADED", |
| 279 | "-DBINDER_WITH_KERNEL_IPC", |
| 280 | ], |
| 281 | static_libs: [ |
| 282 | "libbinder_rpc_single_threaded", |
| 283 | ], |
| 284 | } |
| 285 | |
| 286 | cc_test { |
| 287 | name: "binderRpcTestSingleThreadedNoKernel", |
| 288 | defaults: [ |
| 289 | "binderRpcTest_defaults", |
| 290 | "binderRpcTest_static_defaults", |
| 291 | ], |
| 292 | cflags: [ |
| 293 | "-DBINDER_RPC_SINGLE_THREADED", |
| 294 | ], |
| 295 | static_libs: [ |
| 296 | "libbinder_rpc_single_threaded_no_kernel", |
| 297 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 298 | } |
| 299 | |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 300 | cc_test { |
| 301 | name: "RpcTlsUtilsTest", |
| 302 | host_supported: true, |
| 303 | target: { |
| 304 | darwin: { |
| 305 | enabled: false, |
| 306 | }, |
| 307 | android: { |
| 308 | test_suites: ["vts"], |
| 309 | }, |
| 310 | }, |
| 311 | defaults: [ |
| 312 | "binder_test_defaults", |
| 313 | "libbinder_tls_shared_deps", |
| 314 | ], |
| 315 | srcs: [ |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 316 | "RpcTlsUtilsTest.cpp", |
| 317 | ], |
| 318 | shared_libs: [ |
| 319 | "libbinder", |
| 320 | "libbase", |
| 321 | "libutils", |
| 322 | "liblog", |
| 323 | ], |
| 324 | static_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 325 | "libbinder_tls_test_utils", |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 326 | "libbinder_tls_static", |
| 327 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 328 | test_suites: [ |
| 329 | "general-tests", |
| 330 | "device-tests", |
| 331 | ], |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 332 | } |
| 333 | |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 334 | cc_benchmark { |
| 335 | name: "binderRpcBenchmark", |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 336 | defaults: [ |
| 337 | "binder_test_defaults", |
| 338 | "libbinder_tls_shared_deps", |
| 339 | ], |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 340 | host_supported: true, |
Steven Moreland | 722b490 | 2021-04-16 16:30:18 +0000 | [diff] [blame] | 341 | target: { |
| 342 | darwin: { |
| 343 | enabled: false, |
| 344 | }, |
| 345 | }, |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 346 | srcs: [ |
| 347 | "binderRpcBenchmark.cpp", |
| 348 | "IBinderRpcBenchmark.aidl", |
| 349 | ], |
| 350 | shared_libs: [ |
| 351 | "libbase", |
| 352 | "libbinder", |
| 353 | "liblog", |
| 354 | "libutils", |
| 355 | ], |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 356 | static_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 357 | "libbinder_tls_test_utils", |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 358 | "libbinder_tls_static", |
| 359 | ], |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 360 | } |
| 361 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 362 | cc_test { |
Steven Moreland | 59640db | 2021-07-22 17:19:31 -0700 | [diff] [blame] | 363 | name: "binderRpcWireProtocolTest", |
| 364 | host_supported: true, |
| 365 | target: { |
| 366 | darwin: { |
| 367 | enabled: false, |
| 368 | }, |
| 369 | android: { |
| 370 | test_suites: ["vts"], |
| 371 | }, |
| 372 | }, |
| 373 | defaults: [ |
| 374 | "binder_test_defaults", |
| 375 | ], |
| 376 | srcs: [ |
| 377 | "binderRpcWireProtocolTest.cpp", |
| 378 | ], |
| 379 | shared_libs: [ |
| 380 | "libbinder", |
| 381 | "libbase", |
| 382 | "libutils", |
| 383 | "libcutils", |
| 384 | "liblog", |
| 385 | ], |
| 386 | test_suites: ["general-tests"], |
| 387 | } |
| 388 | |
| 389 | cc_test { |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 390 | name: "binderThroughputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 391 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 392 | srcs: ["binderThroughputTest.cpp"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 393 | shared_libs: [ |
| 394 | "libbinder", |
| 395 | "libutils", |
| 396 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 397 | cflags: [ |
| 398 | "-g", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 399 | "-Wno-missing-field-initializers", |
| 400 | "-Wno-sign-compare", |
| 401 | "-O3", |
| 402 | ], |
| 403 | } |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 404 | |
| 405 | cc_test { |
| 406 | name: "binderTextOutputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 407 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 408 | srcs: ["binderTextOutputTest.cpp"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 409 | shared_libs: [ |
| 410 | "libbinder", |
| 411 | "libutils", |
| 412 | "libbase", |
| 413 | ], |
Steven Moreland | 67812c2 | 2019-07-10 13:50:40 -0700 | [diff] [blame] | 414 | test_suites: ["device-tests"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 415 | } |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 416 | |
| 417 | cc_test { |
| 418 | name: "schd-dbg", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 419 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 420 | srcs: ["schd-dbg.cpp"], |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 421 | shared_libs: [ |
| 422 | "libbinder", |
| 423 | "libutils", |
| 424 | "libbase", |
| 425 | ], |
| 426 | } |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 427 | |
| 428 | cc_test { |
| 429 | name: "binderSafeInterfaceTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 430 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 431 | srcs: ["binderSafeInterfaceTest.cpp"], |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 432 | |
| 433 | cppflags: [ |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 434 | "-Wextra", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 435 | ], |
| 436 | |
| 437 | cpp_std: "experimental", |
| 438 | gnu_extensions: false, |
| 439 | |
| 440 | shared_libs: [ |
| 441 | "libbinder", |
Dan Stoza | 2537db7 | 2017-04-07 16:32:38 -0700 | [diff] [blame] | 442 | "libcutils", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 443 | "liblog", |
| 444 | "libutils", |
| 445 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 446 | test_suites: [ |
| 447 | "device-tests", |
| 448 | "vts", |
| 449 | ], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 450 | require_root: true, |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 451 | } |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 452 | |
Steven Moreland | f23dae2 | 2020-10-27 19:34:55 +0000 | [diff] [blame] | 453 | cc_test { |
| 454 | name: "binderClearBufTest", |
| 455 | defaults: ["binder_test_defaults"], |
| 456 | srcs: [ |
| 457 | "binderClearBufTest.cpp", |
| 458 | ], |
| 459 | |
| 460 | shared_libs: [ |
| 461 | "libbase", |
| 462 | "libbinder", |
| 463 | "liblog", |
| 464 | "libutils", |
| 465 | ], |
| 466 | |
| 467 | test_suites: ["general-tests"], |
| 468 | require_root: true, |
| 469 | } |
| 470 | |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 471 | aidl_interface { |
| 472 | name: "binderStabilityTestIface", |
Jiyong Park | 701fa1a | 2020-04-13 12:55:44 +0900 | [diff] [blame] | 473 | unstable: true, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 474 | srcs: [ |
| 475 | "IBinderStabilityTest.aidl", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 476 | ], |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 477 | backend: { |
| 478 | java: { |
| 479 | enabled: false, |
| 480 | }, |
| 481 | }, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 482 | } |
| 483 | |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 484 | cc_test { |
| 485 | name: "binderStabilityTest", |
| 486 | defaults: ["binder_test_defaults"], |
| 487 | srcs: [ |
| 488 | "binderStabilityTest.cpp", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 489 | ], |
| 490 | |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 491 | // critical that libbinder/libbinder_ndk are shared for VTS |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 492 | shared_libs: [ |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 493 | "libbinder_ndk", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 494 | "libbinder", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 495 | "liblog", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 496 | "libutils", |
| 497 | ], |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 498 | static_libs: [ |
| 499 | "binderStabilityTestIface-cpp", |
Jiyong Park | 9a9427c | 2021-08-09 09:01:15 +0900 | [diff] [blame] | 500 | "binderStabilityTestIface-ndk", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 501 | ], |
| 502 | |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 503 | test_suites: [ |
| 504 | "device-tests", |
| 505 | "vts", |
| 506 | ], |
Dan Shi | 302709b | 2019-09-19 15:28:15 -0700 | [diff] [blame] | 507 | require_root: true, |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 508 | } |
Steven Moreland | 042ae82 | 2020-05-27 17:45:17 +0000 | [diff] [blame] | 509 | |
| 510 | cc_test { |
| 511 | name: "binderAllocationLimits", |
| 512 | defaults: ["binder_test_defaults"], |
| 513 | srcs: ["binderAllocationLimits.cpp"], |
| 514 | shared_libs: [ |
| 515 | "libbinder", |
| 516 | "liblog", |
| 517 | "libutils", |
| 518 | "libutilscallstack", |
| 519 | "libbase", |
| 520 | ], |
| 521 | test_suites: ["device-tests"], |
| 522 | require_root: true, |
| 523 | } |
Andy Hung | 73a1470 | 2020-11-24 13:04:46 -0800 | [diff] [blame] | 524 | |
| 525 | cc_benchmark { |
| 526 | name: "binderParcelBenchmark", |
| 527 | defaults: ["binder_test_defaults"], |
| 528 | srcs: ["binderParcelBenchmark.cpp"], |
| 529 | shared_libs: [ |
| 530 | "libbase", |
| 531 | "libbinder", |
| 532 | "liblog", |
| 533 | "libutils", |
| 534 | ], |
| 535 | } |
Yifan Hong | af766e6 | 2021-06-14 13:24:19 -0700 | [diff] [blame] | 536 | |
| 537 | cc_test_host { |
| 538 | name: "binderUtilsHostTest", |
| 539 | defaults: ["binder_test_defaults"], |
| 540 | srcs: ["binderUtilsHostTest.cpp"], |
| 541 | shared_libs: [ |
| 542 | "libbase", |
| 543 | "libbinder", |
| 544 | ], |
| 545 | static_libs: [ |
| 546 | "libgmock", |
| 547 | ], |
| 548 | test_suites: ["general-tests"], |
Yifan Hong | 44dec54 | 2021-06-22 10:47:44 -0700 | [diff] [blame] | 549 | target: { |
| 550 | darwin: { |
| 551 | enabled: false, |
| 552 | }, |
| 553 | }, |
Yifan Hong | af766e6 | 2021-06-14 13:24:19 -0700 | [diff] [blame] | 554 | } |
Yifan Hong | 1b6f12f | 2021-06-03 20:01:57 -0700 | [diff] [blame] | 555 | |
| 556 | cc_test_host { |
| 557 | name: "binderHostDeviceTest", |
| 558 | defaults: ["binder_test_defaults"], |
| 559 | srcs: ["binderHostDeviceTest.cpp"], |
| 560 | test_config: "binderHostDeviceTest.xml", |
| 561 | shared_libs: [ |
| 562 | "libbase", |
| 563 | "libbinder", |
| 564 | "liblog", |
| 565 | "libutils", |
| 566 | ], |
| 567 | static_libs: [ |
| 568 | "libgmock", |
| 569 | ], |
| 570 | target_required: [ |
| 571 | "binderHostDeviceTestService", |
| 572 | ], |
| 573 | test_suites: ["general-tests"], |
| 574 | target: { |
| 575 | darwin: { |
| 576 | enabled: false, |
| 577 | }, |
| 578 | }, |
| 579 | test_options: { |
| 580 | unit_test: false, |
| 581 | }, |
| 582 | } |
| 583 | |
| 584 | cc_test { |
| 585 | name: "binderHostDeviceTestService", |
| 586 | // The binary is named differently from the module so that PushFilePreparer pushes the binary |
| 587 | // directly, not the test module directory. |
| 588 | stem: "binderHostDeviceTest-service", |
| 589 | defaults: ["binder_test_defaults"], |
| 590 | gtest: false, |
| 591 | auto_gen_config: false, |
| 592 | srcs: ["binderHostDeviceTestService.cpp"], |
| 593 | shared_libs: [ |
| 594 | "libbase", |
| 595 | "libbinder", |
| 596 | "liblog", |
| 597 | "libutils", |
| 598 | ], |
| 599 | test_suites: ["general-tests"], |
| 600 | } |