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