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