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