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