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