Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2012 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 | |
| 17 | cc_defaults { |
| 18 | name: "bionic_tests_defaults", |
| 19 | host_supported: true, |
| 20 | target: { |
| 21 | darwin: { |
| 22 | enabled: false, |
| 23 | }, |
| 24 | }, |
| 25 | cflags: [ |
| 26 | "-fstack-protector-all", |
| 27 | "-g", |
| 28 | "-Wall", |
| 29 | "-Wextra", |
| 30 | "-Wunused", |
| 31 | "-Werror", |
| 32 | "-fno-builtin", |
| 33 | |
| 34 | // We want to test deprecated API too. |
| 35 | "-Wno-deprecated-declarations", |
| 36 | |
| 37 | // For glibc. |
| 38 | "-D__STDC_LIMIT_MACROS", |
| 39 | ], |
| 40 | stl: "libc++", |
| 41 | sanitize: { |
| 42 | never: true, |
| 43 | }, |
| 44 | } |
| 45 | |
| 46 | // ----------------------------------------------------------------------------- |
| 47 | // All standard tests. |
| 48 | // ----------------------------------------------------------------------------- |
| 49 | |
| 50 | cc_test_library { |
| 51 | name: "libBionicStandardTests", |
| 52 | defaults: ["bionic_tests_defaults"], |
| 53 | srcs: [ |
| 54 | "arpa_inet_test.cpp", |
Elliott Hughes | f6495c7 | 2016-07-25 09:20:57 -0700 | [diff] [blame] | 55 | "assert_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 56 | "buffer_tests.cpp", |
| 57 | "bug_26110743_test.cpp", |
| 58 | "complex_test.cpp", |
| 59 | "ctype_test.cpp", |
| 60 | "dirent_test.cpp", |
Elliott Hughes | ba267f4 | 2017-02-24 16:19:53 -0800 | [diff] [blame] | 61 | "endian_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 62 | "error_test.cpp", |
| 63 | "eventfd_test.cpp", |
| 64 | "fcntl_test.cpp", |
| 65 | "fenv_test.cpp", |
| 66 | "ftw_test.cpp", |
| 67 | "getauxval_test.cpp", |
| 68 | "getcwd_test.cpp", |
| 69 | "grp_pwd_test.cpp", |
| 70 | "ifaddrs_test.cpp", |
| 71 | "inttypes_test.cpp", |
Elliott Hughes | fc8e688 | 2016-11-18 16:27:29 -0800 | [diff] [blame] | 72 | "langinfo_test.cpp", |
Josh Gao | 7d15dc3 | 2017-03-13 17:10:46 -0700 | [diff] [blame^] | 73 | "leak_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 74 | "libc_logging_test.cpp", |
| 75 | "libgen_basename_test.cpp", |
| 76 | "libgen_test.cpp", |
| 77 | "locale_test.cpp", |
| 78 | "malloc_test.cpp", |
| 79 | "math_test.cpp", |
| 80 | "mntent_test.cpp", |
| 81 | "netdb_test.cpp", |
| 82 | "net_if_test.cpp", |
| 83 | "netinet_ether_test.cpp", |
| 84 | "netinet_in_test.cpp", |
| 85 | "netinet_udp_test.cpp", |
| 86 | "nl_types_test.cpp", |
| 87 | "pthread_test.cpp", |
| 88 | "pty_test.cpp", |
| 89 | "regex_test.cpp", |
| 90 | "resolv_test.cpp", |
| 91 | "sched_test.cpp", |
| 92 | "search_test.cpp", |
| 93 | "semaphore_test.cpp", |
| 94 | "setjmp_test.cpp", |
| 95 | "signal_test.cpp", |
| 96 | "stack_protector_test.cpp", |
| 97 | "stack_protector_test_helper.cpp", |
| 98 | "stack_unwinding_test.cpp", |
| 99 | "stdatomic_test.cpp", |
| 100 | "stdint_test.cpp", |
| 101 | "stdio_nofortify_test.cpp", |
| 102 | "stdio_test.cpp", |
| 103 | "stdio_ext_test.cpp", |
| 104 | "stdlib_test.cpp", |
| 105 | "string_nofortify_test.cpp", |
| 106 | "string_test.cpp", |
| 107 | "string_posix_strerror_r_test.cpp", |
| 108 | "strings_nofortify_test.cpp", |
| 109 | "strings_test.cpp", |
| 110 | "sstream_test.cpp", |
| 111 | "sys_epoll_test.cpp", |
| 112 | "sys_mman_test.cpp", |
Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 113 | "sys_msg_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 114 | "sys_personality_test.cpp", |
| 115 | "sys_prctl_test.cpp", |
| 116 | "sys_procfs_test.cpp", |
| 117 | "sys_ptrace_test.cpp", |
| 118 | "sys_quota_test.cpp", |
| 119 | "sys_resource_test.cpp", |
| 120 | "sys_select_test.cpp", |
Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 121 | "sys_sem_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 122 | "sys_sendfile_test.cpp", |
Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 123 | "sys_shm_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 124 | "sys_socket_test.cpp", |
| 125 | "sys_stat_test.cpp", |
| 126 | "sys_statvfs_test.cpp", |
| 127 | "sys_syscall_test.cpp", |
| 128 | "sys_sysinfo_test.cpp", |
| 129 | "sys_sysmacros_test.cpp", |
| 130 | "sys_time_test.cpp", |
| 131 | "sys_timex_test.cpp", |
| 132 | "sys_types_test.cpp", |
| 133 | "sys_uio_test.cpp", |
| 134 | "sys_vfs_test.cpp", |
| 135 | "sys_xattr_test.cpp", |
| 136 | "system_properties_test.cpp", |
Dimitry Ivanov | 16b2a4d | 2017-01-24 20:43:29 +0000 | [diff] [blame] | 137 | "system_properties_test2.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 138 | "time_test.cpp", |
| 139 | "uchar_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 140 | "unistd_nofortify_test.cpp", |
| 141 | "unistd_test.cpp", |
| 142 | "utmp_test.cpp", |
| 143 | "wchar_test.cpp", |
| 144 | "wctype_test.cpp", |
| 145 | ], |
| 146 | |
| 147 | include_dirs: [ |
| 148 | "bionic/libc", |
| 149 | "external/tinyxml2", |
| 150 | ], |
| 151 | |
Dan Willemsen | 4156770 | 2016-08-31 16:35:01 -0700 | [diff] [blame] | 152 | static_libs: [ |
| 153 | "libtinyxml2", |
| 154 | "liblog", |
| 155 | "libbase", |
| 156 | ], |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 157 | host_ldlibs: ["-lrt"], |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 158 | shared: { |
| 159 | enabled: false, |
| 160 | }, |
Elliott Hughes | 3f6eee9 | 2016-12-13 23:47:25 +0000 | [diff] [blame] | 161 | |
| 162 | generated_headers: ["generated_android_ids"], |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 163 | } |
| 164 | |
| 165 | // ----------------------------------------------------------------------------- |
| 166 | // Fortify tests. |
| 167 | // ----------------------------------------------------------------------------- |
| 168 | |
| 169 | cc_defaults { |
| 170 | name: "bionic_fortify_tests_defaults", |
| 171 | cflags: [ |
| 172 | "-Wno-error", |
| 173 | "-U_FORTIFY_SOURCE", |
| 174 | ], |
| 175 | srcs: ["fortify_test_main.cpp"], |
| 176 | target: { |
| 177 | host: { |
| 178 | clang_cflags: ["-D__clang__"], |
| 179 | }, |
| 180 | }, |
| 181 | } |
| 182 | |
| 183 | cc_test_library { |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 184 | name: "libfortify1-tests-clang", |
| 185 | defaults: ["bionic_fortify_tests_defaults", "bionic_tests_defaults"], |
| 186 | clang: true, |
| 187 | cflags: [ |
| 188 | "-D_FORTIFY_SOURCE=1", |
| 189 | "-DTEST_NAME=Fortify1_clang" |
| 190 | ], |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 191 | shared: { |
| 192 | enabled: false, |
| 193 | }, |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 194 | } |
| 195 | |
| 196 | cc_test_library { |
| 197 | name: "libfortify2-tests-clang", |
| 198 | defaults: ["bionic_fortify_tests_defaults", "bionic_tests_defaults"], |
| 199 | clang: true, |
| 200 | cflags: [ |
| 201 | "-D_FORTIFY_SOURCE=2", |
| 202 | "-DTEST_NAME=Fortify2_clang" |
| 203 | ], |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 204 | shared: { |
| 205 | enabled: false, |
| 206 | }, |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | // ----------------------------------------------------------------------------- |
| 210 | // Library of all tests (excluding the dynamic linker tests). |
| 211 | // ----------------------------------------------------------------------------- |
| 212 | cc_test_library { |
| 213 | name: "libBionicTests", |
| 214 | defaults: ["bionic_tests_defaults"], |
| 215 | whole_static_libs: [ |
| 216 | "libBionicStandardTests", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 217 | "libfortify1-tests-clang", |
| 218 | "libfortify2-tests-clang", |
| 219 | ], |
Dan Willemsen | 4156770 | 2016-08-31 16:35:01 -0700 | [diff] [blame] | 220 | shared: { |
| 221 | enabled: false, |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 222 | }, |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | // ----------------------------------------------------------------------------- |
| 226 | // Library of bionic customized gtest main function, with simplified output format. |
| 227 | // ----------------------------------------------------------------------------- |
| 228 | cc_test_library { |
| 229 | name: "libBionicGtestMain", |
| 230 | defaults: ["bionic_tests_defaults"], |
Dimitry Ivanov | 927877c | 2016-09-21 11:17:13 -0700 | [diff] [blame] | 231 | srcs: [ |
| 232 | "gtest_main.cpp", |
| 233 | "gtest_globals.cpp", |
| 234 | ], |
| 235 | static_libs: [ |
| 236 | "libbase", |
| 237 | ], |
| 238 | include_dirs: [ |
| 239 | "bionic/libc", |
| 240 | ], |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 241 | target: { |
| 242 | darwin: { |
| 243 | enabled: true, |
| 244 | }, |
| 245 | }, |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 246 | shared: { |
| 247 | enabled: false, |
| 248 | }, |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 249 | } |
| 250 | |
Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 251 | cc_test_library { |
| 252 | name: "libBionicLoaderTests", |
Dimitry Ivanov | ac4bd2f | 2016-11-21 12:50:38 -0800 | [diff] [blame] | 253 | defaults: ["bionic_tests_defaults", "llvm-defaults"], |
Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 254 | srcs: [ |
| 255 | "atexit_test.cpp", |
| 256 | "dl_test.cpp", |
Dimitry Ivanov | 708589f | 2016-09-19 10:50:28 -0700 | [diff] [blame] | 257 | "dlfcn_symlink_support.cpp", |
Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 258 | "dlfcn_test.cpp", |
| 259 | "pthread_dlfcn_test.cpp", |
| 260 | ], |
| 261 | static_libs: [ |
| 262 | "libbase", |
| 263 | ], |
| 264 | include_dirs: [ |
| 265 | "bionic/libc", |
| 266 | ], |
| 267 | shared: { |
| 268 | enabled: false, |
| 269 | }, |
| 270 | target: { |
| 271 | android: { |
| 272 | srcs: [ |
Evgenii Stepanov | 0a3637d | 2016-07-06 13:20:59 -0700 | [diff] [blame] | 273 | "cfi_test.cpp", |
Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 274 | "dlext_test.cpp", |
| 275 | "libdl_test.cpp", |
| 276 | ], |
| 277 | static_libs: [ |
| 278 | "libpagemap", |
Dimitry Ivanov | ac4bd2f | 2016-11-21 12:50:38 -0800 | [diff] [blame] | 279 | "libLLVMObject", |
| 280 | "libLLVMBitReader", |
| 281 | "libLLVMMC", |
| 282 | "libLLVMMCParser", |
| 283 | "libLLVMCore", |
| 284 | "libLLVMSupport", |
Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 285 | ], |
| 286 | } |
| 287 | } |
| 288 | } |
| 289 | |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 290 | // ----------------------------------------------------------------------------- |
| 291 | // Library of bionic customized gtest main function, with normal gtest output format, |
| 292 | // which is needed by bionic cts test. |
| 293 | // ----------------------------------------------------------------------------- |
| 294 | cc_test_library { |
| 295 | name: "libBionicCtsGtestMain", |
| 296 | defaults: ["bionic_tests_defaults"], |
Dimitry Ivanov | 927877c | 2016-09-21 11:17:13 -0700 | [diff] [blame] | 297 | srcs: [ |
| 298 | "gtest_main.cpp", |
| 299 | "gtest_globals_cts.cpp", |
| 300 | ], |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 301 | cppflags: ["-DUSING_GTEST_OUTPUT_FORMAT"], |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 302 | shared: { |
| 303 | enabled: false, |
| 304 | }, |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 305 | } |
| 306 | |
| 307 | // ----------------------------------------------------------------------------- |
| 308 | // Tests for the device using bionic's .so. Run with: |
| 309 | // adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests32 |
| 310 | // adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests64 |
| 311 | // adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests-gcc32 |
| 312 | // adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests-gcc64 |
| 313 | // ----------------------------------------------------------------------------- |
| 314 | cc_defaults { |
| 315 | name: "bionic_unit_tests_defaults", |
| 316 | host_supported: false, |
| 317 | |
| 318 | whole_static_libs: [ |
| 319 | "libBionicTests", |
Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 320 | "libBionicLoaderTests", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 321 | "libBionicGtestMain", |
| 322 | ], |
| 323 | |
| 324 | static_libs: [ |
| 325 | "libtinyxml2", |
| 326 | "liblog", |
| 327 | "libbase", |
| 328 | ], |
| 329 | |
| 330 | srcs: [ |
| 331 | // TODO: Include __cxa_thread_atexit_test.cpp to glibc tests once it is upgraded (glibc 2.18+) |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 332 | "__cxa_thread_atexit_test.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 333 | "thread_local_test.cpp", |
| 334 | ], |
| 335 | |
| 336 | conlyflags: [ |
| 337 | "-fexceptions", |
| 338 | "-fnon-call-exceptions", |
| 339 | ], |
| 340 | |
| 341 | ldflags: ["-Wl,--export-dynamic"], |
| 342 | |
| 343 | include_dirs: ["bionic/libc"], |
| 344 | |
Yabin Cui | 1f553ea | 2017-01-13 12:31:59 -0800 | [diff] [blame] | 345 | stl: "libc++_static", |
| 346 | |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 347 | target: { |
| 348 | android: { |
| 349 | shared_libs: [ |
| 350 | "libdl", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 351 | "libdl_preempt_test_1", |
| 352 | "libdl_preempt_test_2", |
| 353 | "libdl_test_df_1_global", |
| 354 | ], |
| 355 | static_libs: [ |
| 356 | // The order of these libraries matters, do not shuffle them. |
| 357 | "libbase", |
Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 358 | "libpagemap", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 359 | "libziparchive", |
| 360 | "libz", |
| 361 | "libutils", |
Dimitry Ivanov | ac4bd2f | 2016-11-21 12:50:38 -0800 | [diff] [blame] | 362 | "libLLVMObject", |
| 363 | "libLLVMBitReader", |
| 364 | "libLLVMMC", |
| 365 | "libLLVMMCParser", |
| 366 | "libLLVMCore", |
| 367 | "libLLVMSupport", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 368 | ], |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 369 | ldflags: [ |
Colin Cross | 7b29495 | 2016-09-29 14:08:13 -0700 | [diff] [blame] | 370 | "-Wl,--rpath,${ORIGIN}/../bionic-loader-test-libs", |
Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 371 | "-Wl,--enable-new-dtags", |
| 372 | ], |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 373 | }, |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | cc_test { |
| 378 | name: "bionic-unit-tests", |
| 379 | defaults: ["bionic_unit_tests_defaults", "bionic_tests_defaults"], |
| 380 | clang: true, |
Elliott Hughes | a57ca0d | 2016-11-17 18:18:08 -0800 | [diff] [blame] | 381 | |
| 382 | target: { |
| 383 | android: { |
| 384 | shared_libs: ["libicuuc"], |
| 385 | }, |
| 386 | }, |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 387 | } |
| 388 | |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 389 | // ----------------------------------------------------------------------------- |
| 390 | // Tests for the device linked against bionic's static library. Run with: |
| 391 | // adb shell /data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static32 |
| 392 | // adb shell /data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static64 |
| 393 | // ----------------------------------------------------------------------------- |
| 394 | cc_test { |
| 395 | name: "bionic-unit-tests-static", |
| 396 | defaults: ["bionic_tests_defaults"], |
| 397 | host_supported: false, |
| 398 | |
Dimitry Ivanov | 462ea66 | 2017-01-06 14:49:57 -0800 | [diff] [blame] | 399 | srcs: [ |
| 400 | "gtest_preinit_debuggerd.cpp", |
| 401 | ], |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 402 | whole_static_libs: [ |
| 403 | "libBionicTests", |
| 404 | "libBionicGtestMain", |
| 405 | ], |
| 406 | |
| 407 | static_libs: [ |
| 408 | "libm", |
| 409 | "libc", |
| 410 | "libc++_static", |
| 411 | "libdl", |
| 412 | "libtinyxml2", |
| 413 | "liblog", |
| 414 | "libbase", |
Josh Gao | 2a3b4fa | 2016-10-26 17:55:49 -0700 | [diff] [blame] | 415 | "libdebuggerd_handler", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 416 | ], |
| 417 | |
| 418 | static_executable: true, |
| 419 | stl: "libc++_static", |
| 420 | |
| 421 | // libc and libc++ both define std::nothrow. libc's is a private symbol, but this |
| 422 | // still causes issues when linking libc.a and libc++.a, since private isn't |
| 423 | // effective until it has been linked. To fix this, just allow multiple symbol |
| 424 | // definitions for the static tests. |
| 425 | ldflags: ["-Wl,--allow-multiple-definition"], |
| 426 | } |
| 427 | |
| 428 | // ----------------------------------------------------------------------------- |
| 429 | // Tests to run on the host and linked against glibc. Run with: |
| 430 | // cd bionic/tests; mm bionic-unit-tests-glibc-run |
| 431 | // ----------------------------------------------------------------------------- |
| 432 | |
| 433 | cc_test_host { |
| 434 | name: "bionic-unit-tests-glibc", |
| 435 | defaults: ["bionic_tests_defaults"], |
| 436 | |
| 437 | srcs: [ |
| 438 | "atexit_test.cpp", |
Dimitry Ivanov | 708589f | 2016-09-19 10:50:28 -0700 | [diff] [blame] | 439 | "dlfcn_symlink_support.cpp", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 440 | "dlfcn_test.cpp", |
| 441 | "dl_test.cpp", |
| 442 | "pthread_dlfcn_test.cpp", |
| 443 | ], |
| 444 | |
| 445 | shared_libs: [ |
| 446 | "libdl_preempt_test_1", |
| 447 | "libdl_preempt_test_2", |
| 448 | |
| 449 | "libdl_test_df_1_global", |
| 450 | ], |
| 451 | |
| 452 | whole_static_libs: [ |
| 453 | "libBionicStandardTests", |
| 454 | "libBionicGtestMain", |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 455 | "libfortify1-tests-clang", |
| 456 | "libfortify2-tests-clang", |
| 457 | ], |
| 458 | |
| 459 | static_libs: [ |
| 460 | "libbase", |
| 461 | "liblog", |
| 462 | "libcutils", |
| 463 | ], |
| 464 | |
| 465 | host_ldlibs: [ |
| 466 | "-lresolv", |
| 467 | "-lrt", |
| 468 | "-ldl", |
| 469 | "-lutil", |
| 470 | ], |
| 471 | |
| 472 | include_dirs: ["bionic/libc"], |
| 473 | |
Dimitry Ivanov | d0b5c3a | 2016-11-25 12:23:11 -0800 | [diff] [blame] | 474 | ldflags: [ |
| 475 | "-Wl,--rpath,${ORIGIN}/../bionic-loader-test-libs", |
| 476 | "-Wl,--export-dynamic", |
| 477 | ], |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 478 | |
| 479 | sanitize: { |
| 480 | never: false, |
| 481 | }, |
| 482 | } |
| 483 | |
| 484 | subdirs = ["libs"] |