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