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