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