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