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 { |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 35 | name: "binderDriverInterfaceTest", |
| 36 | defaults: ["binder_test_defaults"], |
Yifan Hong | 4e419d8 | 2021-04-26 11:32:56 -0700 | [diff] [blame] | 37 | header_libs: ["libbinder_headers"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 38 | srcs: ["binderDriverInterfaceTest.cpp"], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 39 | test_suites: [ |
| 40 | "device-tests", |
| 41 | "vts", |
| 42 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 43 | } |
| 44 | |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 45 | // unit test only, which can run on host and doesn't use /dev/binder |
| 46 | cc_test { |
Steven Moreland | 2831860 | 2021-06-25 01:16:29 +0000 | [diff] [blame] | 47 | name: "binderUnitTest", |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 48 | host_supported: true, |
| 49 | target: { |
| 50 | darwin: { |
| 51 | enabled: false, |
| 52 | }, |
| 53 | }, |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 54 | srcs: [ |
| 55 | "binderParcelUnitTest.cpp", |
| 56 | "binderBinderUnitTest.cpp", |
Steven Moreland | cf37369 | 2022-01-21 23:55:15 +0000 | [diff] [blame] | 57 | "binderStatusUnitTest.cpp", |
Atneya Nair | 7ade4f4 | 2022-02-07 18:16:48 -0500 | [diff] [blame] | 58 | "binderMemoryHeapBaseUnitTest.cpp", |
Fabián Cañas | 08bdc77 | 2023-01-02 15:02:56 -0500 | [diff] [blame] | 59 | "binderRecordedTransactionTest.cpp", |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 60 | ], |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 61 | shared_libs: [ |
| 62 | "libbinder", |
Steven Moreland | f80809b | 2021-10-07 18:09:20 -0700 | [diff] [blame] | 63 | "libcutils", |
Steven Moreland | cefba61 | 2020-11-05 22:57:06 +0000 | [diff] [blame] | 64 | "libutils", |
| 65 | ], |
| 66 | test_suites: ["general-tests"], |
| 67 | } |
| 68 | |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 69 | cc_test { |
Steven Moreland | a8244b9 | 2023-04-20 23:34:11 +0000 | [diff] [blame] | 70 | name: "binderRecordReplayTest", |
| 71 | srcs: ["binderRecordReplayTest.cpp"], |
| 72 | shared_libs: [ |
| 73 | "libbinder", |
| 74 | "libcutils", |
| 75 | "libutils", |
| 76 | ], |
| 77 | static_libs: [ |
| 78 | "binderRecordReplayTestIface-cpp", |
Pawan Wagh | 8da4538 | 2023-05-11 08:08:50 +0000 | [diff] [blame] | 79 | "binderReadParcelIface-cpp", |
Pawan Wagh | 94bf303 | 2023-07-27 17:15:02 +0000 | [diff] [blame] | 80 | "libbinder_random_parcel_seeds", |
| 81 | "libbinder_random_parcel", |
Steven Moreland | a8244b9 | 2023-04-20 23:34:11 +0000 | [diff] [blame] | 82 | ], |
| 83 | test_suites: ["general-tests"], |
Steven Moreland | 4ed688d | 2023-05-03 23:03:56 +0000 | [diff] [blame] | 84 | require_root: true, |
Steven Moreland | a8244b9 | 2023-04-20 23:34:11 +0000 | [diff] [blame] | 85 | } |
| 86 | |
| 87 | aidl_interface { |
| 88 | name: "binderRecordReplayTestIface", |
| 89 | unstable: true, |
| 90 | srcs: [ |
| 91 | "IBinderRecordReplayTest.aidl", |
| 92 | ], |
Pawan Wagh | 8da4538 | 2023-05-11 08:08:50 +0000 | [diff] [blame] | 93 | imports: ["binderReadParcelIface"], |
| 94 | backend: { |
| 95 | java: { |
| 96 | enabled: true, |
| 97 | platform_apis: true, |
| 98 | }, |
| 99 | }, |
Steven Moreland | a8244b9 | 2023-04-20 23:34:11 +0000 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | cc_test { |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 103 | name: "binderLibTest", |
| 104 | defaults: ["binder_test_defaults"], |
Hsin-Yi Chen | ec18c02 | 2017-07-06 11:40:20 +0800 | [diff] [blame] | 105 | |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 106 | srcs: ["binderLibTest.cpp"], |
| 107 | shared_libs: [ |
Yifan Hong | 84bedeb | 2021-04-21 21:37:17 -0700 | [diff] [blame] | 108 | "libbase", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 109 | "libbinder", |
Yifan Hong | 8b89085 | 2021-06-10 13:44:09 -0700 | [diff] [blame] | 110 | "liblog", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 111 | "libutils", |
| 112 | ], |
Yifan Hong | bbd2a0d | 2021-05-07 22:12:23 -0700 | [diff] [blame] | 113 | static_libs: [ |
| 114 | "libgmock", |
| 115 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 116 | test_suites: [ |
| 117 | "device-tests", |
| 118 | "vts", |
| 119 | ], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 120 | require_root: true, |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 121 | } |
| 122 | |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 123 | aidl_interface { |
| 124 | name: "binderRpcTestIface", |
Andrei Homescu | d65666d | 2023-03-03 07:28:02 +0000 | [diff] [blame] | 125 | vendor_available: true, |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 126 | host_supported: true, |
| 127 | unstable: true, |
| 128 | srcs: [ |
Yifan Hong | 1deca4b | 2021-09-10 16:16:44 -0700 | [diff] [blame] | 129 | "BinderRpcTestClientInfo.aidl", |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 130 | "BinderRpcTestServerConfig.aidl", |
Yifan Hong | 1deca4b | 2021-09-10 16:16:44 -0700 | [diff] [blame] | 131 | "BinderRpcTestServerInfo.aidl", |
Steven Moreland | 659416d | 2021-05-11 00:47:50 +0000 | [diff] [blame] | 132 | "IBinderRpcCallback.aidl", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 133 | "IBinderRpcSession.aidl", |
| 134 | "IBinderRpcTest.aidl", |
Yifan Hong | 1deca4b | 2021-09-10 16:16:44 -0700 | [diff] [blame] | 135 | "ParcelableCertificateData.aidl", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 136 | ], |
| 137 | backend: { |
| 138 | java: { |
| 139 | enabled: false, |
| 140 | }, |
| 141 | }, |
| 142 | } |
| 143 | |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 144 | cc_library_static { |
| 145 | name: "libbinder_tls_test_utils", |
| 146 | host_supported: true, |
Andrei Homescu | d65666d | 2023-03-03 07:28:02 +0000 | [diff] [blame] | 147 | vendor_available: true, |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 148 | target: { |
| 149 | darwin: { |
| 150 | enabled: false, |
| 151 | }, |
| 152 | }, |
| 153 | defaults: [ |
| 154 | "binder_test_defaults", |
| 155 | "libbinder_tls_shared_deps", |
| 156 | ], |
| 157 | shared_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 158 | "libbase", |
| 159 | "liblog", |
| 160 | ], |
| 161 | static_libs: [ |
| 162 | "libbinder_tls_static", |
| 163 | ], |
| 164 | srcs: [ |
| 165 | "RpcTlsTestUtils.cpp", |
| 166 | ], |
| 167 | export_include_dirs: [ |
| 168 | "include_tls_test_utils", |
| 169 | ], |
| 170 | visibility: [ |
| 171 | ":__subpackages__", |
| 172 | ], |
| 173 | } |
| 174 | |
Tomasz Wasilczyk | 26db5e4 | 2023-11-02 11:45:11 -0700 | [diff] [blame] | 175 | cc_library_static { |
| 176 | name: "libbinder_test_utils", |
| 177 | host_supported: true, |
| 178 | vendor_available: true, |
| 179 | target: { |
| 180 | darwin: { |
| 181 | enabled: false, |
| 182 | }, |
| 183 | }, |
| 184 | defaults: [ |
| 185 | "binder_test_defaults", |
| 186 | ], |
| 187 | shared_libs: [ |
| 188 | "libbase", |
| 189 | "liblog", |
| 190 | ], |
| 191 | srcs: [ |
| 192 | "FileUtils.cpp", |
| 193 | ], |
| 194 | visibility: [ |
| 195 | ":__subpackages__", |
| 196 | ], |
| 197 | } |
| 198 | |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 199 | cc_defaults { |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 200 | name: "binderRpcTest_common_defaults", |
Steven Moreland | f6ec463 | 2021-04-01 16:20:47 +0000 | [diff] [blame] | 201 | host_supported: true, |
| 202 | target: { |
| 203 | darwin: { |
| 204 | enabled: false, |
| 205 | }, |
| 206 | }, |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 207 | defaults: [ |
| 208 | "binder_test_defaults", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 209 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 210 | |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 211 | static_libs: [ |
Tomasz Wasilczyk | 26db5e4 | 2023-11-02 11:45:11 -0700 | [diff] [blame] | 212 | "libbinder_test_utils", |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 213 | "libbinder_tls_static", |
| 214 | "libbinder_tls_test_utils", |
| 215 | "binderRpcTestIface-cpp", |
| 216 | "binderRpcTestIface-ndk", |
| 217 | ], |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 218 | } |
| 219 | |
| 220 | cc_defaults { |
| 221 | name: "binderRpcTest_service_defaults", |
| 222 | defaults: [ |
| 223 | "binderRpcTest_common_defaults", |
| 224 | ], |
| 225 | gtest: false, |
| 226 | auto_gen_config: false, |
| 227 | srcs: [ |
| 228 | "binderRpcTestCommon.cpp", |
| 229 | "binderRpcTestService.cpp", |
| 230 | ], |
| 231 | } |
| 232 | |
| 233 | cc_defaults { |
| 234 | name: "binderRpcTest_defaults", |
| 235 | target: { |
| 236 | android: { |
| 237 | test_suites: ["vts"], |
| 238 | }, |
| 239 | }, |
| 240 | defaults: [ |
| 241 | "binderRpcTest_common_defaults", |
| 242 | ], |
| 243 | |
| 244 | srcs: [ |
| 245 | "binderRpcTest.cpp", |
| 246 | "binderRpcTestCommon.cpp", |
Andrei Homescu | 9a9b1b4 | 2022-10-14 01:40:59 +0000 | [diff] [blame] | 247 | "binderRpcUniversalTests.cpp", |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 248 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 249 | |
Steven Moreland | 2053161 | 2023-04-04 18:03:24 +0000 | [diff] [blame] | 250 | // This test uses a lot of resources and takes a long time. Due to |
| 251 | // design of several tests, it is also very sensitive to resource |
| 252 | // contention on the device. b/276820894 |
| 253 | test_options: { |
| 254 | unit_test: false, |
| 255 | }, |
| 256 | |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 257 | test_suites: ["general-tests"], |
| 258 | require_root: true, |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 259 | |
| 260 | data_bins: [ |
| 261 | "binder_rpc_test_service", |
| 262 | "binder_rpc_test_service_no_kernel", |
| 263 | "binder_rpc_test_service_single_threaded", |
| 264 | "binder_rpc_test_service_single_threaded_no_kernel", |
| 265 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 266 | } |
| 267 | |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 268 | cc_defaults { |
| 269 | name: "binderRpcTest_shared_defaults", |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 270 | cflags: [ |
| 271 | "-DBINDER_WITH_KERNEL_IPC", |
| 272 | ], |
| 273 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 274 | shared_libs: [ |
| 275 | "libbinder", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 276 | "libbinder_ndk", |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 277 | "libbase", |
| 278 | "libutils", |
| 279 | "libcutils", |
| 280 | "liblog", |
| 281 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 282 | } |
| 283 | |
| 284 | cc_defaults { |
| 285 | name: "binderRpcTest_static_defaults", |
| 286 | |
| 287 | shared_libs: [ |
Andrei Homescu | 68a5561 | 2022-08-02 01:25:15 +0000 | [diff] [blame] | 288 | "liblog", |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 289 | "libutils", |
| 290 | // libcrypto_static is not visible to this module |
| 291 | "libcrypto", |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 292 | ], |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 293 | static_libs: [ |
| 294 | "libbase", |
| 295 | "libcutils", |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 296 | "libssl", |
| 297 | ], |
| 298 | |
| 299 | cflags: [ |
| 300 | // Disable tests that require shared libraries, |
| 301 | // e.g., libbinder.so or libbinder_ndk.so |
| 302 | "-DBINDER_TEST_NO_SHARED_LIBS", |
| 303 | ], |
| 304 | } |
| 305 | |
| 306 | cc_test { |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 307 | // The module name cannot start with "binderRpcTest" because |
| 308 | // then atest tries to execute it as part of binderRpcTest |
| 309 | name: "binder_rpc_test_service", |
| 310 | defaults: [ |
| 311 | "binderRpcTest_service_defaults", |
| 312 | "binderRpcTest_shared_defaults", |
| 313 | "libbinder_tls_shared_deps", |
| 314 | ], |
| 315 | } |
| 316 | |
| 317 | cc_test { |
| 318 | name: "binder_rpc_test_service_no_kernel", |
| 319 | defaults: [ |
| 320 | "binderRpcTest_service_defaults", |
| 321 | "binderRpcTest_static_defaults", |
| 322 | ], |
| 323 | static_libs: [ |
| 324 | "libbinder_rpc_no_kernel", |
| 325 | ], |
| 326 | } |
| 327 | |
| 328 | cc_test { |
| 329 | name: "binder_rpc_test_service_single_threaded", |
| 330 | defaults: [ |
| 331 | "binderRpcTest_service_defaults", |
| 332 | "binderRpcTest_static_defaults", |
| 333 | ], |
| 334 | cflags: [ |
| 335 | "-DBINDER_RPC_SINGLE_THREADED", |
| 336 | "-DBINDER_WITH_KERNEL_IPC", |
| 337 | ], |
| 338 | static_libs: [ |
| 339 | "libbinder_rpc_single_threaded", |
| 340 | ], |
| 341 | } |
| 342 | |
| 343 | cc_test { |
| 344 | name: "binder_rpc_test_service_single_threaded_no_kernel", |
| 345 | defaults: [ |
| 346 | "binderRpcTest_service_defaults", |
| 347 | "binderRpcTest_static_defaults", |
| 348 | ], |
| 349 | cflags: [ |
| 350 | "-DBINDER_RPC_SINGLE_THREADED", |
| 351 | ], |
| 352 | static_libs: [ |
| 353 | "libbinder_rpc_single_threaded_no_kernel", |
| 354 | ], |
| 355 | } |
| 356 | |
Andrei Homescu | 9d8adb1 | 2022-08-02 04:38:30 +0000 | [diff] [blame] | 357 | cc_binary { |
| 358 | name: "binderRpcTestService_on_trusty_mock", |
| 359 | defaults: [ |
| 360 | "trusty_mock_defaults", |
| 361 | ], |
| 362 | |
| 363 | srcs: [ |
| 364 | "binderRpcTestCommon.cpp", |
| 365 | "binderRpcTestServiceTrusty.cpp", |
| 366 | ], |
| 367 | |
| 368 | shared_libs: [ |
| 369 | "libbinder_on_trusty_mock", |
| 370 | "libbase", |
| 371 | "libutils", |
| 372 | "libcutils", |
| 373 | ], |
| 374 | |
| 375 | static_libs: [ |
| 376 | "binderRpcTestIface-cpp", |
| 377 | ], |
| 378 | } |
| 379 | |
Andrei Homescu | 4d9420e | 2023-01-31 01:38:48 +0000 | [diff] [blame] | 380 | cc_binary { |
| 381 | name: "binderRpcTest_on_trusty_mock", |
| 382 | defaults: [ |
| 383 | "trusty_mock_defaults", |
| 384 | ], |
| 385 | |
| 386 | srcs: [ |
| 387 | "binderRpcUniversalTests.cpp", |
| 388 | "binderRpcTestCommon.cpp", |
| 389 | "binderRpcTestTrusty.cpp", |
| 390 | ], |
| 391 | |
| 392 | shared_libs: [ |
| 393 | "libbinder_on_trusty_mock", |
| 394 | "libbase", |
| 395 | "libutils", |
| 396 | "libcutils", |
| 397 | ], |
| 398 | |
| 399 | static_libs: [ |
| 400 | "binderRpcTestIface-cpp", |
| 401 | "libgtest", |
| 402 | ], |
| 403 | } |
| 404 | |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 405 | cc_test { |
| 406 | name: "binderRpcTest", |
| 407 | defaults: [ |
| 408 | "binderRpcTest_defaults", |
| 409 | "binderRpcTest_shared_defaults", |
| 410 | "libbinder_tls_shared_deps", |
| 411 | ], |
Andrei Homescu | 875996f | 2022-08-24 04:25:11 +0000 | [diff] [blame] | 412 | |
| 413 | // Add the Trusty mock library as a fake dependency so it gets built |
| 414 | required: [ |
| 415 | "libbinder_on_trusty_mock", |
Andrei Homescu | 9d8adb1 | 2022-08-02 04:38:30 +0000 | [diff] [blame] | 416 | "binderRpcTestService_on_trusty_mock", |
Andrei Homescu | 4d9420e | 2023-01-31 01:38:48 +0000 | [diff] [blame] | 417 | "binderRpcTest_on_trusty_mock", |
Andrei Homescu | 875996f | 2022-08-24 04:25:11 +0000 | [diff] [blame] | 418 | ], |
Andrei Homescu | 2a29801 | 2022-06-15 01:08:54 +0000 | [diff] [blame] | 419 | } |
| 420 | |
| 421 | cc_test { |
Andrei Homescu | 12106de | 2022-04-27 04:42:21 +0000 | [diff] [blame] | 422 | name: "binderRpcTestNoKernel", |
| 423 | defaults: [ |
| 424 | "binderRpcTest_defaults", |
| 425 | "binderRpcTest_static_defaults", |
| 426 | ], |
| 427 | static_libs: [ |
| 428 | "libbinder_rpc_no_kernel", |
| 429 | ], |
| 430 | } |
| 431 | |
| 432 | cc_test { |
| 433 | name: "binderRpcTestSingleThreaded", |
| 434 | defaults: [ |
| 435 | "binderRpcTest_defaults", |
| 436 | "binderRpcTest_static_defaults", |
| 437 | ], |
| 438 | cflags: [ |
| 439 | "-DBINDER_RPC_SINGLE_THREADED", |
| 440 | "-DBINDER_WITH_KERNEL_IPC", |
| 441 | ], |
| 442 | static_libs: [ |
| 443 | "libbinder_rpc_single_threaded", |
| 444 | ], |
| 445 | } |
| 446 | |
| 447 | cc_test { |
| 448 | name: "binderRpcTestSingleThreadedNoKernel", |
| 449 | defaults: [ |
| 450 | "binderRpcTest_defaults", |
| 451 | "binderRpcTest_static_defaults", |
| 452 | ], |
| 453 | cflags: [ |
| 454 | "-DBINDER_RPC_SINGLE_THREADED", |
| 455 | ], |
| 456 | static_libs: [ |
| 457 | "libbinder_rpc_single_threaded_no_kernel", |
| 458 | ], |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 459 | } |
| 460 | |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 461 | cc_test { |
Andrei Homescu | d65666d | 2023-03-03 07:28:02 +0000 | [diff] [blame] | 462 | name: "binderRpcToTrustyTest", |
| 463 | vendor: true, |
| 464 | host_supported: false, |
| 465 | defaults: [ |
| 466 | "binderRpcTest_common_defaults", |
| 467 | "binderRpcTest_static_defaults", |
| 468 | ], |
| 469 | |
| 470 | srcs: [ |
| 471 | "binderRpcTest.cpp", |
| 472 | "binderRpcTestCommon.cpp", |
| 473 | "binderRpcUniversalTests.cpp", |
| 474 | ], |
| 475 | |
| 476 | cflags: [ |
| 477 | "-DBINDER_RPC_TO_TRUSTY_TEST", |
| 478 | ], |
| 479 | |
| 480 | static_libs: [ |
| 481 | // We want to link libbinder statically so we can push the binary |
| 482 | // to the device for testing independently of the library |
| 483 | "libbinder_rpc_no_kernel", |
| 484 | "libbinder_trusty", |
| 485 | "libtrusty", |
| 486 | ], |
| 487 | |
| 488 | test_suites: ["device-tests"], |
| 489 | require_root: true, |
| 490 | } |
| 491 | |
| 492 | cc_test { |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 493 | name: "RpcTlsUtilsTest", |
| 494 | host_supported: true, |
| 495 | target: { |
| 496 | darwin: { |
| 497 | enabled: false, |
| 498 | }, |
| 499 | android: { |
| 500 | test_suites: ["vts"], |
| 501 | }, |
| 502 | }, |
| 503 | defaults: [ |
| 504 | "binder_test_defaults", |
| 505 | "libbinder_tls_shared_deps", |
| 506 | ], |
| 507 | srcs: [ |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 508 | "RpcTlsUtilsTest.cpp", |
| 509 | ], |
| 510 | shared_libs: [ |
| 511 | "libbinder", |
| 512 | "libbase", |
| 513 | "libutils", |
| 514 | "liblog", |
| 515 | ], |
| 516 | static_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 517 | "libbinder_tls_test_utils", |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 518 | "libbinder_tls_static", |
| 519 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 520 | test_suites: [ |
| 521 | "general-tests", |
| 522 | "device-tests", |
| 523 | ], |
Yifan Hong | ff73aa9 | 2021-09-17 21:28:01 -0700 | [diff] [blame] | 524 | } |
| 525 | |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 526 | cc_benchmark { |
| 527 | name: "binderRpcBenchmark", |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 528 | defaults: [ |
| 529 | "binder_test_defaults", |
| 530 | "libbinder_tls_shared_deps", |
| 531 | ], |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 532 | host_supported: true, |
Steven Moreland | 722b490 | 2021-04-16 16:30:18 +0000 | [diff] [blame] | 533 | target: { |
| 534 | darwin: { |
| 535 | enabled: false, |
| 536 | }, |
| 537 | }, |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 538 | srcs: [ |
| 539 | "binderRpcBenchmark.cpp", |
| 540 | "IBinderRpcBenchmark.aidl", |
| 541 | ], |
| 542 | shared_libs: [ |
| 543 | "libbase", |
| 544 | "libbinder", |
| 545 | "liblog", |
| 546 | "libutils", |
| 547 | ], |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 548 | static_libs: [ |
Yifan Hong | e0e5328 | 2021-09-23 18:37:21 -0700 | [diff] [blame] | 549 | "libbinder_tls_test_utils", |
Yifan Hong | aecdd17 | 2021-09-21 14:53:13 -0700 | [diff] [blame] | 550 | "libbinder_tls_static", |
| 551 | ], |
Steven Moreland | cda6085 | 2021-04-14 23:45:32 +0000 | [diff] [blame] | 552 | } |
| 553 | |
Steven Moreland | 5553ac4 | 2020-11-11 02:14:45 +0000 | [diff] [blame] | 554 | cc_test { |
Steven Moreland | 59640db | 2021-07-22 17:19:31 -0700 | [diff] [blame] | 555 | name: "binderRpcWireProtocolTest", |
| 556 | host_supported: true, |
| 557 | target: { |
| 558 | darwin: { |
| 559 | enabled: false, |
| 560 | }, |
| 561 | android: { |
| 562 | test_suites: ["vts"], |
| 563 | }, |
| 564 | }, |
| 565 | defaults: [ |
| 566 | "binder_test_defaults", |
| 567 | ], |
| 568 | srcs: [ |
| 569 | "binderRpcWireProtocolTest.cpp", |
| 570 | ], |
| 571 | shared_libs: [ |
| 572 | "libbinder", |
| 573 | "libbase", |
| 574 | "libutils", |
| 575 | "libcutils", |
| 576 | "liblog", |
| 577 | ], |
| 578 | test_suites: ["general-tests"], |
| 579 | } |
| 580 | |
| 581 | cc_test { |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 582 | name: "binderThroughputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 583 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 584 | srcs: ["binderThroughputTest.cpp"], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 585 | shared_libs: [ |
| 586 | "libbinder", |
| 587 | "libutils", |
| 588 | ], |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 589 | cflags: [ |
| 590 | "-g", |
Dan Willemsen | 59e086f | 2016-07-25 17:13:45 -0700 | [diff] [blame] | 591 | "-Wno-missing-field-initializers", |
| 592 | "-Wno-sign-compare", |
| 593 | "-O3", |
| 594 | ], |
| 595 | } |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 596 | |
| 597 | cc_test { |
| 598 | name: "binderTextOutputTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 599 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 600 | srcs: ["binderTextOutputTest.cpp"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 601 | shared_libs: [ |
| 602 | "libbinder", |
| 603 | "libutils", |
| 604 | "libbase", |
| 605 | ], |
Steven Moreland | 67812c2 | 2019-07-10 13:50:40 -0700 | [diff] [blame] | 606 | test_suites: ["device-tests"], |
Wei Wang | 78f2a37 | 2016-10-20 23:18:17 -0700 | [diff] [blame] | 607 | } |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 608 | |
| 609 | cc_test { |
| 610 | name: "schd-dbg", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 611 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 612 | srcs: ["schd-dbg.cpp"], |
Howard Chen | c135dbc | 2017-03-25 17:12:59 +0800 | [diff] [blame] | 613 | shared_libs: [ |
| 614 | "libbinder", |
| 615 | "libutils", |
| 616 | "libbase", |
| 617 | ], |
| 618 | } |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 619 | |
| 620 | cc_test { |
| 621 | name: "binderSafeInterfaceTest", |
Chih-Hung Hsieh | d1acbbc | 2017-10-05 13:38:28 -0700 | [diff] [blame] | 622 | defaults: ["binder_test_defaults"], |
Steven Moreland | c7a30c8 | 2019-07-10 13:12:23 -0700 | [diff] [blame] | 623 | srcs: ["binderSafeInterfaceTest.cpp"], |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 624 | |
| 625 | cppflags: [ |
Colin Cross | 1383d9f | 2019-11-06 13:33:40 -0800 | [diff] [blame] | 626 | "-Wextra", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 627 | ], |
| 628 | |
| 629 | cpp_std: "experimental", |
| 630 | gnu_extensions: false, |
| 631 | |
| 632 | shared_libs: [ |
| 633 | "libbinder", |
Dan Stoza | 2537db7 | 2017-04-07 16:32:38 -0700 | [diff] [blame] | 634 | "libcutils", |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 635 | "liblog", |
| 636 | "libutils", |
| 637 | ], |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 638 | test_suites: [ |
| 639 | "device-tests", |
| 640 | "vts", |
| 641 | ], |
Dan Shi | 80ada59 | 2019-09-13 09:17:17 -0700 | [diff] [blame] | 642 | require_root: true, |
Dan Stoza | d630e52 | 2016-12-01 15:16:31 -0800 | [diff] [blame] | 643 | } |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 644 | |
Steven Moreland | f23dae2 | 2020-10-27 19:34:55 +0000 | [diff] [blame] | 645 | cc_test { |
| 646 | name: "binderClearBufTest", |
| 647 | defaults: ["binder_test_defaults"], |
| 648 | srcs: [ |
| 649 | "binderClearBufTest.cpp", |
| 650 | ], |
| 651 | |
| 652 | shared_libs: [ |
| 653 | "libbase", |
| 654 | "libbinder", |
| 655 | "liblog", |
| 656 | "libutils", |
| 657 | ], |
| 658 | |
| 659 | test_suites: ["general-tests"], |
| 660 | require_root: true, |
| 661 | } |
| 662 | |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 663 | aidl_interface { |
| 664 | name: "binderStabilityTestIface", |
Jiyong Park | 701fa1a | 2020-04-13 12:55:44 +0900 | [diff] [blame] | 665 | unstable: true, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 666 | srcs: [ |
| 667 | "IBinderStabilityTest.aidl", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 668 | ], |
Steven Moreland | 37aff18 | 2021-03-26 02:04:16 +0000 | [diff] [blame] | 669 | backend: { |
| 670 | java: { |
| 671 | enabled: false, |
| 672 | }, |
| 673 | }, |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 674 | } |
| 675 | |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 676 | cc_test { |
| 677 | name: "binderStabilityTest", |
| 678 | defaults: ["binder_test_defaults"], |
| 679 | srcs: [ |
| 680 | "binderStabilityTest.cpp", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 681 | ], |
| 682 | |
Steven Moreland | 13f8466 | 2020-07-23 21:30:41 +0000 | [diff] [blame] | 683 | // critical that libbinder/libbinder_ndk are shared for VTS |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 684 | shared_libs: [ |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 685 | "libbinder_ndk", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 686 | "libbinder", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 687 | "liblog", |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 688 | "libutils", |
| 689 | ], |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 690 | static_libs: [ |
| 691 | "binderStabilityTestIface-cpp", |
Jiyong Park | 9a9427c | 2021-08-09 09:01:15 +0900 | [diff] [blame] | 692 | "binderStabilityTestIface-ndk", |
Steven Moreland | 12300a0 | 2019-08-02 13:27:15 -0700 | [diff] [blame] | 693 | ], |
| 694 | |
Steven Moreland | ea7659e | 2022-02-03 00:04:06 +0000 | [diff] [blame] | 695 | test_suites: [ |
| 696 | "device-tests", |
| 697 | "vts", |
| 698 | ], |
Dan Shi | 302709b | 2019-09-19 15:28:15 -0700 | [diff] [blame] | 699 | require_root: true, |
Steven Moreland | dea3cf9 | 2019-07-16 18:06:55 -0700 | [diff] [blame] | 700 | } |
Steven Moreland | 042ae82 | 2020-05-27 17:45:17 +0000 | [diff] [blame] | 701 | |
| 702 | cc_test { |
| 703 | name: "binderAllocationLimits", |
| 704 | defaults: ["binder_test_defaults"], |
| 705 | srcs: ["binderAllocationLimits.cpp"], |
| 706 | shared_libs: [ |
| 707 | "libbinder", |
| 708 | "liblog", |
Steven Moreland | 66acefe | 2022-09-09 00:34:40 +0000 | [diff] [blame] | 709 | "libcutils", |
Steven Moreland | 042ae82 | 2020-05-27 17:45:17 +0000 | [diff] [blame] | 710 | "libutils", |
| 711 | "libutilscallstack", |
| 712 | "libbase", |
| 713 | ], |
| 714 | test_suites: ["device-tests"], |
| 715 | require_root: true, |
| 716 | } |
Andy Hung | 73a1470 | 2020-11-24 13:04:46 -0800 | [diff] [blame] | 717 | |
| 718 | cc_benchmark { |
| 719 | name: "binderParcelBenchmark", |
| 720 | defaults: ["binder_test_defaults"], |
| 721 | srcs: ["binderParcelBenchmark.cpp"], |
| 722 | shared_libs: [ |
| 723 | "libbase", |
| 724 | "libbinder", |
| 725 | "liblog", |
| 726 | "libutils", |
| 727 | ], |
Steven Moreland | 9b254dd | 2023-05-11 00:37:55 +0000 | [diff] [blame] | 728 | test_suites: ["general-tests"], |
Andy Hung | 73a1470 | 2020-11-24 13:04:46 -0800 | [diff] [blame] | 729 | } |
Yifan Hong | af766e6 | 2021-06-14 13:24:19 -0700 | [diff] [blame] | 730 | |
| 731 | cc_test_host { |
| 732 | name: "binderUtilsHostTest", |
| 733 | defaults: ["binder_test_defaults"], |
| 734 | srcs: ["binderUtilsHostTest.cpp"], |
| 735 | shared_libs: [ |
| 736 | "libbase", |
| 737 | "libbinder", |
| 738 | ], |
| 739 | static_libs: [ |
| 740 | "libgmock", |
| 741 | ], |
| 742 | test_suites: ["general-tests"], |
Yifan Hong | 44dec54 | 2021-06-22 10:47:44 -0700 | [diff] [blame] | 743 | target: { |
| 744 | darwin: { |
| 745 | enabled: false, |
| 746 | }, |
| 747 | }, |
Yifan Hong | af766e6 | 2021-06-14 13:24:19 -0700 | [diff] [blame] | 748 | } |
Yifan Hong | 1b6f12f | 2021-06-03 20:01:57 -0700 | [diff] [blame] | 749 | |
| 750 | cc_test_host { |
| 751 | name: "binderHostDeviceTest", |
| 752 | defaults: ["binder_test_defaults"], |
| 753 | srcs: ["binderHostDeviceTest.cpp"], |
| 754 | test_config: "binderHostDeviceTest.xml", |
| 755 | shared_libs: [ |
| 756 | "libbase", |
| 757 | "libbinder", |
| 758 | "liblog", |
| 759 | "libutils", |
| 760 | ], |
| 761 | static_libs: [ |
| 762 | "libgmock", |
| 763 | ], |
| 764 | target_required: [ |
| 765 | "binderHostDeviceTestService", |
| 766 | ], |
| 767 | test_suites: ["general-tests"], |
| 768 | target: { |
| 769 | darwin: { |
| 770 | enabled: false, |
| 771 | }, |
| 772 | }, |
| 773 | test_options: { |
| 774 | unit_test: false, |
| 775 | }, |
| 776 | } |
| 777 | |
| 778 | cc_test { |
| 779 | name: "binderHostDeviceTestService", |
| 780 | // The binary is named differently from the module so that PushFilePreparer pushes the binary |
| 781 | // directly, not the test module directory. |
| 782 | stem: "binderHostDeviceTest-service", |
| 783 | defaults: ["binder_test_defaults"], |
| 784 | gtest: false, |
| 785 | auto_gen_config: false, |
| 786 | srcs: ["binderHostDeviceTestService.cpp"], |
| 787 | shared_libs: [ |
| 788 | "libbase", |
| 789 | "libbinder", |
| 790 | "liblog", |
| 791 | "libutils", |
| 792 | ], |
| 793 | test_suites: ["general-tests"], |
| 794 | } |
Pawan | f00fabb | 2022-08-04 17:56:18 +0000 | [diff] [blame] | 795 | |
| 796 | cc_defaults { |
| 797 | name: "service_fuzzer_defaults", |
| 798 | static_libs: [ |
| 799 | "libbase", |
| 800 | "libbinder_random_parcel", |
| 801 | "libcutils", |
| 802 | ], |
| 803 | target: { |
| 804 | android: { |
| 805 | shared_libs: [ |
| 806 | "libbinder_ndk", |
| 807 | "libbinder", |
| 808 | "libutils", |
| 809 | ], |
| 810 | }, |
| 811 | host: { |
| 812 | static_libs: [ |
| 813 | "libbinder_ndk", |
| 814 | "libbinder", |
| 815 | "libutils", |
| 816 | ], |
| 817 | }, |
| 818 | darwin: { |
| 819 | enabled: false, |
| 820 | }, |
| 821 | }, |
| 822 | fuzz_config: { |
| 823 | cc: [ |
| 824 | "smoreland@google.com", |
| 825 | "waghpawan@google.com", |
| 826 | ], |
Pawan Wagh | 595377b | 2022-11-16 08:42:20 +0000 | [diff] [blame] | 827 | // Adds bugs to hotlist "AIDL fuzzers bugs" on buganizer |
| 828 | hotlists: ["4637097"], |
Pawan | f00fabb | 2022-08-04 17:56:18 +0000 | [diff] [blame] | 829 | }, |
| 830 | } |
Pawan Wagh | 475f66c | 2023-05-05 21:46:07 +0000 | [diff] [blame] | 831 | |
| 832 | cc_defaults { |
| 833 | name: "fuzzer_disable_leaks", |
Pawan Wagh | 9e2d296 | 2023-06-20 23:43:24 +0000 | [diff] [blame] | 834 | fuzz_config: { |
| 835 | asan_options: [ |
| 836 | "detect_leaks=0", |
| 837 | ], |
| 838 | hwasan_options: [ |
| 839 | "detect_leaks=0", |
| 840 | ], |
| 841 | }, |
Pawan Wagh | 475f66c | 2023-05-05 21:46:07 +0000 | [diff] [blame] | 842 | } |