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", |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 144 | "BinderRpcTestServerConfig.aidl", |
Yifan Hong | 1deca4b | 2021-09-10 16:16:44 -0700 | [diff] [blame] | 145 | "BinderRpcTestServerInfo.aidl", |
Steven Moreland | 659416d | 2021-05-11 00:47:50 +0000 | [diff] [blame] | 146 | "IBinderRpcCallback.aidl", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 147 | "IBinderRpcSession.aidl", |
| 148 | "IBinderRpcTest.aidl", |
Yifan Hong | 1deca4b | 2021-09-10 16:16:44 -0700 | [diff] [blame] | 149 | "ParcelableCertificateData.aidl", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 150 | ], |
| 151 | backend: { |
| 152 | java: { |
| 153 | enabled: false, |
| 154 | }, |
| 155 | }, |
| 156 | } |
| 157 | |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 158 | cc_library_static { |
| 159 | name: "libbinder_tls_test_utils", |
| 160 | host_supported: true, |
| 161 | target: { |
| 162 | darwin: { |
| 163 | enabled: false, |
| 164 | }, |
| 165 | }, |
| 166 | defaults: [ |
| 167 | "binder_test_defaults", |
| 168 | "libbinder_tls_shared_deps", |
| 169 | ], |
| 170 | shared_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 171 | "libbase", |
| 172 | "liblog", |
| 173 | ], |
| 174 | static_libs: [ |
| 175 | "libbinder_tls_static", |
| 176 | ], |
| 177 | srcs: [ |
| 178 | "RpcTlsTestUtils.cpp", |
| 179 | ], |
| 180 | export_include_dirs: [ |
| 181 | "include_tls_test_utils", |
| 182 | ], |
| 183 | visibility: [ |
| 184 | ":__subpackages__", |
| 185 | ], |
| 186 | } |
| 187 | |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 188 | cc_defaults { |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 189 | name: "binderRpcTest_common_defaults", |
Steven Moreland | f6ec463 | 2021-04-01 16:20:47 +0000 | [diff] [blame] | 190 | host_supported: true, |
| 191 | target: { |
| 192 | darwin: { |
| 193 | enabled: false, |
| 194 | }, |
| 195 | }, |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 196 | defaults: [ |
| 197 | "binder_test_defaults", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 198 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 199 | |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 200 | static_libs: [ |
| 201 | "libbinder_tls_static", |
| 202 | "libbinder_tls_test_utils", |
| 203 | "binderRpcTestIface-cpp", |
| 204 | "binderRpcTestIface-ndk", |
| 205 | ], |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | cc_defaults { |
| 209 | name: "binderRpcTest_service_defaults", |
| 210 | defaults: [ |
| 211 | "binderRpcTest_common_defaults", |
| 212 | ], |
| 213 | gtest: false, |
| 214 | auto_gen_config: false, |
| 215 | srcs: [ |
| 216 | "binderRpcTestCommon.cpp", |
| 217 | "binderRpcTestService.cpp", |
| 218 | ], |
| 219 | } |
| 220 | |
| 221 | cc_defaults { |
| 222 | name: "binderRpcTest_defaults", |
| 223 | target: { |
| 224 | android: { |
| 225 | test_suites: ["vts"], |
| 226 | }, |
| 227 | }, |
| 228 | defaults: [ |
| 229 | "binderRpcTest_common_defaults", |
| 230 | ], |
| 231 | |
| 232 | srcs: [ |
| 233 | "binderRpcTest.cpp", |
| 234 | "binderRpcTestCommon.cpp", |
| 235 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 236 | |
| 237 | test_suites: ["general-tests"], |
| 238 | require_root: true, |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 239 | |
| 240 | data_bins: [ |
| 241 | "binder_rpc_test_service", |
| 242 | "binder_rpc_test_service_no_kernel", |
| 243 | "binder_rpc_test_service_single_threaded", |
| 244 | "binder_rpc_test_service_single_threaded_no_kernel", |
| 245 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 246 | } |
| 247 | |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 248 | cc_defaults { |
| 249 | name: "binderRpcTest_shared_defaults", |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 250 | cflags: [ |
| 251 | "-DBINDER_WITH_KERNEL_IPC", |
| 252 | ], |
| 253 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 254 | shared_libs: [ |
| 255 | "libbinder", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 256 | "libbinder_ndk", |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 257 | "libbase", |
| 258 | "libutils", |
| 259 | "libcutils", |
| 260 | "liblog", |
| 261 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 262 | } |
| 263 | |
| 264 | cc_defaults { |
| 265 | name: "binderRpcTest_static_defaults", |
| 266 | |
| 267 | shared_libs: [ |
| 268 | "libutils", |
| 269 | // libcrypto_static is not visible to this module |
| 270 | "libcrypto", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 271 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 272 | static_libs: [ |
| 273 | "libbase", |
| 274 | "libcutils", |
| 275 | "liblog", |
| 276 | "libssl", |
| 277 | ], |
| 278 | |
| 279 | cflags: [ |
| 280 | // Disable tests that require shared libraries, |
| 281 | // e.g., libbinder.so or libbinder_ndk.so |
| 282 | "-DBINDER_TEST_NO_SHARED_LIBS", |
| 283 | ], |
| 284 | } |
| 285 | |
| 286 | cc_test { |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 287 | // The module name cannot start with "binderRpcTest" because |
| 288 | // then atest tries to execute it as part of binderRpcTest |
| 289 | name: "binder_rpc_test_service", |
| 290 | defaults: [ |
| 291 | "binderRpcTest_service_defaults", |
| 292 | "binderRpcTest_shared_defaults", |
| 293 | "libbinder_tls_shared_deps", |
| 294 | ], |
| 295 | } |
| 296 | |
| 297 | cc_test { |
| 298 | name: "binder_rpc_test_service_no_kernel", |
| 299 | defaults: [ |
| 300 | "binderRpcTest_service_defaults", |
| 301 | "binderRpcTest_static_defaults", |
| 302 | ], |
| 303 | static_libs: [ |
| 304 | "libbinder_rpc_no_kernel", |
| 305 | ], |
| 306 | } |
| 307 | |
| 308 | cc_test { |
| 309 | name: "binder_rpc_test_service_single_threaded", |
| 310 | defaults: [ |
| 311 | "binderRpcTest_service_defaults", |
| 312 | "binderRpcTest_static_defaults", |
| 313 | ], |
| 314 | cflags: [ |
| 315 | "-DBINDER_RPC_SINGLE_THREADED", |
| 316 | "-DBINDER_WITH_KERNEL_IPC", |
| 317 | ], |
| 318 | static_libs: [ |
| 319 | "libbinder_rpc_single_threaded", |
| 320 | ], |
| 321 | } |
| 322 | |
| 323 | cc_test { |
| 324 | name: "binder_rpc_test_service_single_threaded_no_kernel", |
| 325 | defaults: [ |
| 326 | "binderRpcTest_service_defaults", |
| 327 | "binderRpcTest_static_defaults", |
| 328 | ], |
| 329 | cflags: [ |
| 330 | "-DBINDER_RPC_SINGLE_THREADED", |
| 331 | ], |
| 332 | static_libs: [ |
| 333 | "libbinder_rpc_single_threaded_no_kernel", |
| 334 | ], |
| 335 | } |
| 336 | |
| 337 | cc_test { |
| 338 | name: "binderRpcTest", |
| 339 | defaults: [ |
| 340 | "binderRpcTest_defaults", |
| 341 | "binderRpcTest_shared_defaults", |
| 342 | "libbinder_tls_shared_deps", |
| 343 | ], |
Andrei Homescu | 875996f | 2022-08-24 04:25:11 +0000 | [diff] [blame^] | 344 | |
| 345 | // Add the Trusty mock library as a fake dependency so it gets built |
| 346 | required: [ |
| 347 | "libbinder_on_trusty_mock", |
| 348 | ], |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 349 | } |
| 350 | |
| 351 | cc_test { |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 352 | name: "binderRpcTestNoKernel", |
| 353 | defaults: [ |
| 354 | "binderRpcTest_defaults", |
| 355 | "binderRpcTest_static_defaults", |
| 356 | ], |
| 357 | static_libs: [ |
| 358 | "libbinder_rpc_no_kernel", |
| 359 | ], |
| 360 | } |
| 361 | |
| 362 | cc_test { |
| 363 | name: "binderRpcTestSingleThreaded", |
| 364 | defaults: [ |
| 365 | "binderRpcTest_defaults", |
| 366 | "binderRpcTest_static_defaults", |
| 367 | ], |
| 368 | cflags: [ |
| 369 | "-DBINDER_RPC_SINGLE_THREADED", |
| 370 | "-DBINDER_WITH_KERNEL_IPC", |
| 371 | ], |
| 372 | static_libs: [ |
| 373 | "libbinder_rpc_single_threaded", |
| 374 | ], |
| 375 | } |
| 376 | |
| 377 | cc_test { |
| 378 | name: "binderRpcTestSingleThreadedNoKernel", |
| 379 | defaults: [ |
| 380 | "binderRpcTest_defaults", |
| 381 | "binderRpcTest_static_defaults", |
| 382 | ], |
| 383 | cflags: [ |
| 384 | "-DBINDER_RPC_SINGLE_THREADED", |
| 385 | ], |
| 386 | static_libs: [ |
| 387 | "libbinder_rpc_single_threaded_no_kernel", |
| 388 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 389 | } |
| 390 | |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 391 | cc_test { |
| 392 | name: "RpcTlsUtilsTest", |
| 393 | host_supported: true, |
| 394 | target: { |
| 395 | darwin: { |
| 396 | enabled: false, |
| 397 | }, |
| 398 | android: { |
| 399 | test_suites: ["vts"], |
| 400 | }, |
| 401 | }, |
| 402 | defaults: [ |
| 403 | "binder_test_defaults", |
| 404 | "libbinder_tls_shared_deps", |
| 405 | ], |
| 406 | srcs: [ |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 407 | "RpcTlsUtilsTest.cpp", |
| 408 | ], |
| 409 | shared_libs: [ |
| 410 | "libbinder", |
| 411 | "libbase", |
| 412 | "libutils", |
| 413 | "liblog", |
| 414 | ], |
| 415 | static_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 416 | "libbinder_tls_test_utils", |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 417 | "libbinder_tls_static", |
| 418 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 419 | test_suites: [ |
| 420 | "general-tests", |
| 421 | "device-tests", |
| 422 | ], |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 423 | } |
| 424 | |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 425 | cc_benchmark { |
| 426 | name: "binderRpcBenchmark", |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 427 | defaults: [ |
| 428 | "binder_test_defaults", |
| 429 | "libbinder_tls_shared_deps", |
| 430 | ], |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 431 | host_supported: true, |
Steven Moreland | 722b490 | 2021-04-16 16:30:18 +0000 | [diff] [blame] | 432 | target: { |
| 433 | darwin: { |
| 434 | enabled: false, |
| 435 | }, |
| 436 | }, |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 437 | srcs: [ |
| 438 | "binderRpcBenchmark.cpp", |
| 439 | "IBinderRpcBenchmark.aidl", |
| 440 | ], |
| 441 | shared_libs: [ |
| 442 | "libbase", |
| 443 | "libbinder", |
| 444 | "liblog", |
| 445 | "libutils", |
| 446 | ], |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 447 | static_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 448 | "libbinder_tls_test_utils", |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 449 | "libbinder_tls_static", |
| 450 | ], |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 451 | } |
| 452 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 453 | cc_test { |
Steven Moreland | 59640db | 2021-07-22 17:19:31 -0700 | [diff] [blame] | 454 | name: "binderRpcWireProtocolTest", |
| 455 | host_supported: true, |
| 456 | target: { |
| 457 | darwin: { |
| 458 | enabled: false, |
| 459 | }, |
| 460 | android: { |
| 461 | test_suites: ["vts"], |
| 462 | }, |
| 463 | }, |
| 464 | defaults: [ |
| 465 | "binder_test_defaults", |
| 466 | ], |
| 467 | srcs: [ |
| 468 | "binderRpcWireProtocolTest.cpp", |
| 469 | ], |
| 470 | shared_libs: [ |
| 471 | "libbinder", |
| 472 | "libbase", |
| 473 | "libutils", |
| 474 | "libcutils", |
| 475 | "liblog", |
| 476 | ], |
| 477 | test_suites: ["general-tests"], |
| 478 | } |
| 479 | |
| 480 | cc_test { |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 481 | name: "binderThroughputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 482 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 483 | srcs: ["binderThroughputTest.cpp"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 484 | shared_libs: [ |
| 485 | "libbinder", |
| 486 | "libutils", |
| 487 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 488 | cflags: [ |
| 489 | "-g", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 490 | "-Wno-missing-field-initializers", |
| 491 | "-Wno-sign-compare", |
| 492 | "-O3", |
| 493 | ], |
| 494 | } |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 495 | |
| 496 | cc_test { |
| 497 | name: "binderTextOutputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 498 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 499 | srcs: ["binderTextOutputTest.cpp"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 500 | shared_libs: [ |
| 501 | "libbinder", |
| 502 | "libutils", |
| 503 | "libbase", |
| 504 | ], |
Steven Moreland | 67812c2 | 2019-07-10 13:50:40 -0700 | [diff] [blame] | 505 | test_suites: ["device-tests"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 506 | } |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 507 | |
| 508 | cc_test { |
| 509 | name: "schd-dbg", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 510 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 511 | srcs: ["schd-dbg.cpp"], |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 512 | shared_libs: [ |
| 513 | "libbinder", |
| 514 | "libutils", |
| 515 | "libbase", |
| 516 | ], |
| 517 | } |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 518 | |
| 519 | cc_test { |
| 520 | name: "binderSafeInterfaceTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 521 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 522 | srcs: ["binderSafeInterfaceTest.cpp"], |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 523 | |
| 524 | cppflags: [ |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 525 | "-Wextra", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 526 | ], |
| 527 | |
| 528 | cpp_std: "experimental", |
| 529 | gnu_extensions: false, |
| 530 | |
| 531 | shared_libs: [ |
| 532 | "libbinder", |
Dan Stoza | 2537db7 | 2017-04-07 16:32:38 -0700 | [diff] [blame] | 533 | "libcutils", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 534 | "liblog", |
| 535 | "libutils", |
| 536 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 537 | test_suites: [ |
| 538 | "device-tests", |
| 539 | "vts", |
| 540 | ], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 541 | require_root: true, |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 542 | } |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 543 | |
Steven Moreland | f23dae2 | 2020-10-27 19:34:55 +0000 | [diff] [blame] | 544 | cc_test { |
| 545 | name: "binderClearBufTest", |
| 546 | defaults: ["binder_test_defaults"], |
| 547 | srcs: [ |
| 548 | "binderClearBufTest.cpp", |
| 549 | ], |
| 550 | |
| 551 | shared_libs: [ |
| 552 | "libbase", |
| 553 | "libbinder", |
| 554 | "liblog", |
| 555 | "libutils", |
| 556 | ], |
| 557 | |
| 558 | test_suites: ["general-tests"], |
| 559 | require_root: true, |
| 560 | } |
| 561 | |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 562 | aidl_interface { |
| 563 | name: "binderStabilityTestIface", |
Jiyong Park | 701fa1a | 2020-04-13 12:55:44 +0900 | [diff] [blame] | 564 | unstable: true, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 565 | srcs: [ |
| 566 | "IBinderStabilityTest.aidl", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 567 | ], |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 568 | backend: { |
| 569 | java: { |
| 570 | enabled: false, |
| 571 | }, |
| 572 | }, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 573 | } |
| 574 | |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 575 | cc_test { |
| 576 | name: "binderStabilityTest", |
| 577 | defaults: ["binder_test_defaults"], |
| 578 | srcs: [ |
| 579 | "binderStabilityTest.cpp", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 580 | ], |
| 581 | |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 582 | // critical that libbinder/libbinder_ndk are shared for VTS |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 583 | shared_libs: [ |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 584 | "libbinder_ndk", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 585 | "libbinder", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 586 | "liblog", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 587 | "libutils", |
| 588 | ], |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 589 | static_libs: [ |
| 590 | "binderStabilityTestIface-cpp", |
Jiyong Park | 9a9427c | 2021-08-09 09:01:15 +0900 | [diff] [blame] | 591 | "binderStabilityTestIface-ndk", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 592 | ], |
| 593 | |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 594 | test_suites: [ |
| 595 | "device-tests", |
| 596 | "vts", |
| 597 | ], |
Dan Shi | 302709b | 2019-09-19 15:28:15 -0700 | [diff] [blame] | 598 | require_root: true, |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 599 | } |
Steven Moreland | 042ae82 | 2020-05-27 17:45:17 +0000 | [diff] [blame] | 600 | |
| 601 | cc_test { |
| 602 | name: "binderAllocationLimits", |
| 603 | defaults: ["binder_test_defaults"], |
| 604 | srcs: ["binderAllocationLimits.cpp"], |
| 605 | shared_libs: [ |
| 606 | "libbinder", |
| 607 | "liblog", |
| 608 | "libutils", |
| 609 | "libutilscallstack", |
| 610 | "libbase", |
| 611 | ], |
| 612 | test_suites: ["device-tests"], |
| 613 | require_root: true, |
| 614 | } |
Andy Hung | 73a1470 | 2020-11-24 13:04:46 -0800 | [diff] [blame] | 615 | |
| 616 | cc_benchmark { |
| 617 | name: "binderParcelBenchmark", |
| 618 | defaults: ["binder_test_defaults"], |
| 619 | srcs: ["binderParcelBenchmark.cpp"], |
| 620 | shared_libs: [ |
| 621 | "libbase", |
| 622 | "libbinder", |
| 623 | "liblog", |
| 624 | "libutils", |
| 625 | ], |
| 626 | } |
Yifan Hong | af766e6 | 2021-06-14 13:24:19 -0700 | [diff] [blame] | 627 | |
| 628 | cc_test_host { |
| 629 | name: "binderUtilsHostTest", |
| 630 | defaults: ["binder_test_defaults"], |
| 631 | srcs: ["binderUtilsHostTest.cpp"], |
| 632 | shared_libs: [ |
| 633 | "libbase", |
| 634 | "libbinder", |
| 635 | ], |
| 636 | static_libs: [ |
| 637 | "libgmock", |
| 638 | ], |
| 639 | test_suites: ["general-tests"], |
Yifan Hong | 44dec54 | 2021-06-22 10:47:44 -0700 | [diff] [blame] | 640 | target: { |
| 641 | darwin: { |
| 642 | enabled: false, |
| 643 | }, |
| 644 | }, |
Yifan Hong | af766e6 | 2021-06-14 13:24:19 -0700 | [diff] [blame] | 645 | } |
Yifan Hong | 1b6f12f | 2021-06-03 20:01:57 -0700 | [diff] [blame] | 646 | |
| 647 | cc_test_host { |
| 648 | name: "binderHostDeviceTest", |
| 649 | defaults: ["binder_test_defaults"], |
| 650 | srcs: ["binderHostDeviceTest.cpp"], |
| 651 | test_config: "binderHostDeviceTest.xml", |
| 652 | shared_libs: [ |
| 653 | "libbase", |
| 654 | "libbinder", |
| 655 | "liblog", |
| 656 | "libutils", |
| 657 | ], |
| 658 | static_libs: [ |
| 659 | "libgmock", |
| 660 | ], |
| 661 | target_required: [ |
| 662 | "binderHostDeviceTestService", |
| 663 | ], |
| 664 | test_suites: ["general-tests"], |
| 665 | target: { |
| 666 | darwin: { |
| 667 | enabled: false, |
| 668 | }, |
| 669 | }, |
| 670 | test_options: { |
| 671 | unit_test: false, |
| 672 | }, |
| 673 | } |
| 674 | |
| 675 | cc_test { |
| 676 | name: "binderHostDeviceTestService", |
| 677 | // The binary is named differently from the module so that PushFilePreparer pushes the binary |
| 678 | // directly, not the test module directory. |
| 679 | stem: "binderHostDeviceTest-service", |
| 680 | defaults: ["binder_test_defaults"], |
| 681 | gtest: false, |
| 682 | auto_gen_config: false, |
| 683 | srcs: ["binderHostDeviceTestService.cpp"], |
| 684 | shared_libs: [ |
| 685 | "libbase", |
| 686 | "libbinder", |
| 687 | "liblog", |
| 688 | "libutils", |
| 689 | ], |
| 690 | test_suites: ["general-tests"], |
| 691 | } |
Pawan | f00fabb | 2022-08-04 17:56:18 +0000 | [diff] [blame] | 692 | |
| 693 | cc_defaults { |
| 694 | name: "service_fuzzer_defaults", |
| 695 | static_libs: [ |
| 696 | "libbase", |
| 697 | "libbinder_random_parcel", |
| 698 | "libcutils", |
| 699 | ], |
| 700 | target: { |
| 701 | android: { |
| 702 | shared_libs: [ |
| 703 | "libbinder_ndk", |
| 704 | "libbinder", |
| 705 | "libutils", |
| 706 | ], |
| 707 | }, |
| 708 | host: { |
| 709 | static_libs: [ |
| 710 | "libbinder_ndk", |
| 711 | "libbinder", |
| 712 | "libutils", |
| 713 | ], |
| 714 | }, |
| 715 | darwin: { |
| 716 | enabled: false, |
| 717 | }, |
| 718 | }, |
| 719 | fuzz_config: { |
| 720 | cc: [ |
| 721 | "smoreland@google.com", |
| 722 | "waghpawan@google.com", |
| 723 | ], |
| 724 | }, |
| 725 | } |