| 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, | 
| Tom Cherry | 60ddedf | 2018-02-20 15:40:02 -0800 | [diff] [blame] | 20 | cpp_std: "experimental", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 21 | target: { | 
|  | 22 | darwin: { | 
|  | 23 | enabled: false, | 
|  | 24 | }, | 
|  | 25 | }, | 
|  | 26 | cflags: [ | 
|  | 27 | "-fstack-protector-all", | 
|  | 28 | "-g", | 
|  | 29 | "-Wall", | 
|  | 30 | "-Wextra", | 
|  | 31 | "-Wunused", | 
|  | 32 | "-Werror", | 
|  | 33 | "-fno-builtin", | 
|  | 34 |  | 
|  | 35 | // We want to test deprecated API too. | 
|  | 36 | "-Wno-deprecated-declarations", | 
|  | 37 |  | 
|  | 38 | // For glibc. | 
|  | 39 | "-D__STDC_LIMIT_MACROS", | 
|  | 40 | ], | 
| Peter Collingbourne | da1bc79 | 2018-09-06 22:20:44 -0700 | [diff] [blame] | 41 | // Make the bionic tests implicitly test bionic's shadow call stack support. | 
|  | 42 | arch: { | 
|  | 43 | arm64: { | 
|  | 44 | cflags: ["-fsanitize=shadow-call-stack"], | 
|  | 45 | }, | 
|  | 46 | }, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 47 | stl: "libc++", | 
|  | 48 | sanitize: { | 
|  | 49 | never: true, | 
|  | 50 | }, | 
|  | 51 | } | 
|  | 52 |  | 
|  | 53 | // ----------------------------------------------------------------------------- | 
|  | 54 | // All standard tests. | 
|  | 55 | // ----------------------------------------------------------------------------- | 
|  | 56 |  | 
| George Burgess IV | de45dcb | 2018-03-16 14:15:01 -0700 | [diff] [blame] | 57 | // Test diagnostics emitted by clang. The library that results is useless; we | 
|  | 58 | // just want to run '-Xclang -verify', which will fail if the diagnostics don't | 
|  | 59 | // match up with what the source file says they should be. | 
|  | 60 | cc_test_library { | 
|  | 61 | name: "clang_diagnostic_tests", | 
|  | 62 | cflags: [ | 
|  | 63 | "-Xclang", | 
|  | 64 | "-verify", | 
|  | 65 | ], | 
|  | 66 | srcs: ["sys_ioctl_diag_test.cpp"], | 
|  | 67 | } | 
|  | 68 |  | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 69 | cc_test_library { | 
|  | 70 | name: "libBionicStandardTests", | 
|  | 71 | defaults: ["bionic_tests_defaults"], | 
|  | 72 | srcs: [ | 
| Aleksandra Tsvetkova | 608b451 | 2015-02-27 15:01:59 +0300 | [diff] [blame] | 73 | "alloca_test.cpp", | 
| Elliott Hughes | ce934e3 | 2018-09-06 13:26:08 -0700 | [diff] [blame] | 74 | "android_get_device_api_level.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 75 | "arpa_inet_test.cpp", | 
| Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 76 | "async_safe_test.cpp", | 
| Elliott Hughes | f6495c7 | 2016-07-25 09:20:57 -0700 | [diff] [blame] | 77 | "assert_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 78 | "buffer_tests.cpp", | 
|  | 79 | "bug_26110743_test.cpp", | 
| Aleksandra Tsvetkova | 608b451 | 2015-02-27 15:01:59 +0300 | [diff] [blame] | 80 | "byteswap_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 81 | "complex_test.cpp", | 
| Elliott Hughes | 50cda38 | 2017-09-14 15:30:08 -0700 | [diff] [blame] | 82 | "complex_force_long_double_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 83 | "ctype_test.cpp", | 
|  | 84 | "dirent_test.cpp", | 
| Elliott Hughes | d390df1 | 2017-04-30 22:56:10 -0700 | [diff] [blame] | 85 | "elf_test.cpp", | 
| Elliott Hughes | ba267f4 | 2017-02-24 16:19:53 -0800 | [diff] [blame] | 86 | "endian_test.cpp", | 
| Elliott Hughes | e452cb1 | 2017-06-13 14:43:53 -0700 | [diff] [blame] | 87 | "errno_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 88 | "error_test.cpp", | 
|  | 89 | "eventfd_test.cpp", | 
|  | 90 | "fcntl_test.cpp", | 
| Josh Gao | f6e5b58 | 2018-06-01 15:30:54 -0700 | [diff] [blame] | 91 | "fdsan_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 92 | "fenv_test.cpp", | 
| Elliott Hughes | 45da326 | 2017-08-29 15:28:33 -0700 | [diff] [blame] | 93 | "float_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 94 | "ftw_test.cpp", | 
|  | 95 | "getauxval_test.cpp", | 
|  | 96 | "getcwd_test.cpp", | 
| Elliott Hughes | f1c568d | 2017-09-26 17:09:07 -0700 | [diff] [blame] | 97 | "glob_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 98 | "grp_pwd_test.cpp", | 
| Tom Cherry | 6034ef8 | 2018-02-02 16:10:07 -0800 | [diff] [blame] | 99 | "grp_pwd_file_test.cpp", | 
| Elliott Hughes | a648733 | 2017-08-15 23:16:48 -0700 | [diff] [blame] | 100 | "iconv_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 101 | "ifaddrs_test.cpp", | 
|  | 102 | "inttypes_test.cpp", | 
| Elliott Hughes | 45da326 | 2017-08-29 15:28:33 -0700 | [diff] [blame] | 103 | "iso646_test.c", | 
| Elliott Hughes | fc8e688 | 2016-11-18 16:27:29 -0800 | [diff] [blame] | 104 | "langinfo_test.cpp", | 
| Josh Gao | 7d15dc3 | 2017-03-13 17:10:46 -0700 | [diff] [blame] | 105 | "leak_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 106 | "libgen_basename_test.cpp", | 
|  | 107 | "libgen_test.cpp", | 
| Elliott Hughes | 45da326 | 2017-08-29 15:28:33 -0700 | [diff] [blame] | 108 | "limits_test.cpp", | 
| Christopher Ferris | ee1e0a3 | 2017-04-20 13:38:49 -0700 | [diff] [blame] | 109 | "linux_swab_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 110 | "locale_test.cpp", | 
|  | 111 | "malloc_test.cpp", | 
|  | 112 | "math_test.cpp", | 
| Elliott Hughes | 50cda38 | 2017-09-14 15:30:08 -0700 | [diff] [blame] | 113 | "math_force_long_double_test.cpp", | 
| Orion Hodson | 6ba6694 | 2018-08-30 11:10:23 +0100 | [diff] [blame] | 114 | "membarrier_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 115 | "mntent_test.cpp", | 
|  | 116 | "netdb_test.cpp", | 
|  | 117 | "net_if_test.cpp", | 
|  | 118 | "netinet_ether_test.cpp", | 
|  | 119 | "netinet_in_test.cpp", | 
| Elliott Hughes | e5a5eec | 2018-06-27 12:29:06 -0700 | [diff] [blame] | 120 | "netinet_ip_icmp_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 121 | "netinet_udp_test.cpp", | 
|  | 122 | "nl_types_test.cpp", | 
| Elliott Hughes | eab6572 | 2018-08-30 12:15:56 -0700 | [diff] [blame] | 123 | "poll_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 124 | "pthread_test.cpp", | 
|  | 125 | "pty_test.cpp", | 
|  | 126 | "regex_test.cpp", | 
|  | 127 | "resolv_test.cpp", | 
|  | 128 | "sched_test.cpp", | 
| Elliott Hughes | 5059939 | 2017-05-25 17:13:32 -0700 | [diff] [blame] | 129 | "scsi_sg_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 130 | "search_test.cpp", | 
|  | 131 | "semaphore_test.cpp", | 
|  | 132 | "setjmp_test.cpp", | 
|  | 133 | "signal_test.cpp", | 
| Elliott Hughes | 14e3ff9 | 2017-10-06 16:58:36 -0700 | [diff] [blame] | 134 | "spawn_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 135 | "stack_protector_test.cpp", | 
|  | 136 | "stack_protector_test_helper.cpp", | 
|  | 137 | "stack_unwinding_test.cpp", | 
| Elliott Hughes | 45da326 | 2017-08-29 15:28:33 -0700 | [diff] [blame] | 138 | "stdalign_test.cpp", | 
|  | 139 | "stdarg_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 140 | "stdatomic_test.cpp", | 
| Elliott Hughes | 45da326 | 2017-08-29 15:28:33 -0700 | [diff] [blame] | 141 | "stdbool_test.c", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 142 | "stdint_test.cpp", | 
|  | 143 | "stdio_nofortify_test.cpp", | 
|  | 144 | "stdio_test.cpp", | 
|  | 145 | "stdio_ext_test.cpp", | 
|  | 146 | "stdlib_test.cpp", | 
| Elliott Hughes | 45da326 | 2017-08-29 15:28:33 -0700 | [diff] [blame] | 147 | "stdnoreturn_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 148 | "string_nofortify_test.cpp", | 
|  | 149 | "string_test.cpp", | 
|  | 150 | "string_posix_strerror_r_test.cpp", | 
|  | 151 | "strings_nofortify_test.cpp", | 
|  | 152 | "strings_test.cpp", | 
|  | 153 | "sstream_test.cpp", | 
|  | 154 | "sys_epoll_test.cpp", | 
|  | 155 | "sys_mman_test.cpp", | 
| Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 156 | "sys_msg_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 157 | "sys_personality_test.cpp", | 
|  | 158 | "sys_prctl_test.cpp", | 
|  | 159 | "sys_procfs_test.cpp", | 
|  | 160 | "sys_ptrace_test.cpp", | 
|  | 161 | "sys_quota_test.cpp", | 
| Elliott Hughes | 8465e96 | 2017-09-27 16:33:35 -0700 | [diff] [blame] | 162 | "sys_random_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 163 | "sys_resource_test.cpp", | 
|  | 164 | "sys_select_test.cpp", | 
| Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 165 | "sys_sem_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 166 | "sys_sendfile_test.cpp", | 
| Elliott Hughes | 7c59f3f | 2016-08-16 18:14:26 -0700 | [diff] [blame] | 167 | "sys_shm_test.cpp", | 
| Elliott Hughes | 5905d6f | 2018-01-30 15:09:51 -0800 | [diff] [blame] | 168 | "sys_signalfd_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 169 | "sys_socket_test.cpp", | 
|  | 170 | "sys_stat_test.cpp", | 
|  | 171 | "sys_statvfs_test.cpp", | 
|  | 172 | "sys_syscall_test.cpp", | 
|  | 173 | "sys_sysinfo_test.cpp", | 
|  | 174 | "sys_sysmacros_test.cpp", | 
|  | 175 | "sys_time_test.cpp", | 
|  | 176 | "sys_timex_test.cpp", | 
| Elliott Hughes | 02fdd05 | 2017-07-06 10:33:15 -0700 | [diff] [blame] | 177 | "sys_ttydefaults_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 178 | "sys_types_test.cpp", | 
|  | 179 | "sys_uio_test.cpp", | 
| Elliott Hughes | e7d185f | 2018-06-27 13:30:02 -0700 | [diff] [blame] | 180 | "sys_un_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 181 | "sys_vfs_test.cpp", | 
|  | 182 | "sys_xattr_test.cpp", | 
|  | 183 | "system_properties_test.cpp", | 
| Dimitry Ivanov | 16b2a4d | 2017-01-24 20:43:29 +0000 | [diff] [blame] | 184 | "system_properties_test2.cpp", | 
| Elliott Hughes | 5da9646 | 2017-12-14 09:43:59 -0800 | [diff] [blame] | 185 | "termios_test.cpp", | 
| Elliott Hughes | 45da326 | 2017-08-29 15:28:33 -0700 | [diff] [blame] | 186 | "tgmath_test.c", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 187 | "time_test.cpp", | 
|  | 188 | "uchar_test.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 189 | "unistd_nofortify_test.cpp", | 
|  | 190 | "unistd_test.cpp", | 
|  | 191 | "utmp_test.cpp", | 
|  | 192 | "wchar_test.cpp", | 
|  | 193 | "wctype_test.cpp", | 
|  | 194 | ], | 
|  | 195 |  | 
|  | 196 | include_dirs: [ | 
|  | 197 | "bionic/libc", | 
|  | 198 | "external/tinyxml2", | 
|  | 199 | ], | 
|  | 200 |  | 
| Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 201 | target: { | 
| Dan Willemsen | 268ae36 | 2017-09-21 16:56:06 -0700 | [diff] [blame] | 202 | bionic: { | 
| Tom Cherry | e275d6d | 2017-12-11 23:31:33 -0800 | [diff] [blame] | 203 | whole_static_libs: [ | 
|  | 204 | "libasync_safe", | 
|  | 205 | "libsystemproperties", | 
|  | 206 | ], | 
| Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 207 | }, | 
|  | 208 | }, | 
|  | 209 |  | 
| Dan Willemsen | 4156770 | 2016-08-31 16:35:01 -0700 | [diff] [blame] | 210 | static_libs: [ | 
|  | 211 | "libtinyxml2", | 
|  | 212 | "liblog", | 
|  | 213 | "libbase", | 
|  | 214 | ], | 
| Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 215 | shared: { | 
|  | 216 | enabled: false, | 
|  | 217 | }, | 
| Elliott Hughes | 3f6eee9 | 2016-12-13 23:47:25 +0000 | [diff] [blame] | 218 |  | 
|  | 219 | generated_headers: ["generated_android_ids"], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 220 | } | 
|  | 221 |  | 
|  | 222 | // ----------------------------------------------------------------------------- | 
|  | 223 | // Fortify tests. | 
|  | 224 | // ----------------------------------------------------------------------------- | 
|  | 225 |  | 
|  | 226 | cc_defaults { | 
|  | 227 | name: "bionic_fortify_tests_defaults", | 
|  | 228 | cflags: [ | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 229 | "-U_FORTIFY_SOURCE", | 
|  | 230 | ], | 
|  | 231 | srcs: ["fortify_test_main.cpp"], | 
|  | 232 | target: { | 
|  | 233 | host: { | 
|  | 234 | clang_cflags: ["-D__clang__"], | 
|  | 235 | }, | 
|  | 236 | }, | 
|  | 237 | } | 
|  | 238 |  | 
| George Burgess IV | d9551db | 2017-08-17 18:51:02 -0700 | [diff] [blame] | 239 | // If building this fails, then we have both FORTIFY and ASAN enabled, which | 
|  | 240 | // isn't desirable. (Ideally, we'd emit FORTIFY diagnostics even with ASAN | 
|  | 241 | // enabled, but that's not a reality today.) This is meant to be otherwise | 
|  | 242 | // unused. | 
|  | 243 | cc_test_library { | 
|  | 244 | name: "fortify_disabled_for_asan", | 
|  | 245 | cflags: [ | 
|  | 246 | "-Werror", | 
|  | 247 | "-D_FORTIFY_SOURCE=2", | 
|  | 248 | // "sanitize: address" doesn't work on platforms where libasan isn't | 
|  | 249 | // enabled. Since the intent is just to build this, we can get away with | 
|  | 250 | // passing this flag on its own. | 
|  | 251 | "-fsanitize=address", | 
|  | 252 | ], | 
|  | 253 | // Ignore that we don't have ASAN symbols linked in. | 
|  | 254 | allow_undefined_symbols: true, | 
| George Burgess IV | 0086fc8 | 2017-10-31 11:22:47 -0700 | [diff] [blame] | 255 | srcs: ["fortify_filecheck_diagnostics_test.cpp"], | 
| George Burgess IV | d9551db | 2017-08-17 18:51:02 -0700 | [diff] [blame] | 256 | } | 
|  | 257 |  | 
| George Burgess IV | e5d66eb | 2017-10-30 21:41:22 -0700 | [diff] [blame] | 258 | // Ensure we don't use FORTIFY'ed functions with the static analyzer/clang-tidy: | 
|  | 259 | // it can confuse these tools pretty easily. If this builds successfully, then | 
|  | 260 | // __clang_analyzer__ overrode FORTIFY. Otherwise, FORTIFY was incorrectly | 
|  | 261 | // enabled. The library that results from building this is meant to be unused. | 
|  | 262 | cc_test_library { | 
|  | 263 | name: "fortify_disabled_for_tidy", | 
|  | 264 | cflags: [ | 
|  | 265 | "-Werror", | 
|  | 266 | "-D_FORTIFY_SOURCE=2", | 
|  | 267 | "-D__clang_analyzer__", | 
|  | 268 | ], | 
| George Burgess IV | 0086fc8 | 2017-10-31 11:22:47 -0700 | [diff] [blame] | 269 | srcs: ["fortify_filecheck_diagnostics_test.cpp"], | 
| George Burgess IV | e5d66eb | 2017-10-30 21:41:22 -0700 | [diff] [blame] | 270 | } | 
|  | 271 |  | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 272 | cc_test_library { | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 273 | name: "libfortify1-tests-clang", | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 274 | defaults: [ | 
|  | 275 | "bionic_fortify_tests_defaults", | 
|  | 276 | "bionic_tests_defaults", | 
|  | 277 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 278 | cflags: [ | 
|  | 279 | "-D_FORTIFY_SOURCE=1", | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 280 | "-DTEST_NAME=Fortify1_clang", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 281 | ], | 
| Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 282 | shared: { | 
|  | 283 | enabled: false, | 
|  | 284 | }, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 285 | } | 
|  | 286 |  | 
|  | 287 | cc_test_library { | 
|  | 288 | name: "libfortify2-tests-clang", | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 289 | defaults: [ | 
|  | 290 | "bionic_fortify_tests_defaults", | 
|  | 291 | "bionic_tests_defaults", | 
|  | 292 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 293 | cflags: [ | 
|  | 294 | "-D_FORTIFY_SOURCE=2", | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 295 | "-DTEST_NAME=Fortify2_clang", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 296 | ], | 
| Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 297 | shared: { | 
|  | 298 | enabled: false, | 
|  | 299 | }, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 300 | } | 
|  | 301 |  | 
|  | 302 | // ----------------------------------------------------------------------------- | 
|  | 303 | // Library of all tests (excluding the dynamic linker tests). | 
|  | 304 | // ----------------------------------------------------------------------------- | 
|  | 305 | cc_test_library { | 
|  | 306 | name: "libBionicTests", | 
|  | 307 | defaults: ["bionic_tests_defaults"], | 
|  | 308 | whole_static_libs: [ | 
|  | 309 | "libBionicStandardTests", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 310 | "libfortify1-tests-clang", | 
|  | 311 | "libfortify2-tests-clang", | 
|  | 312 | ], | 
| Dan Willemsen | 4156770 | 2016-08-31 16:35:01 -0700 | [diff] [blame] | 313 | shared: { | 
|  | 314 | enabled: false, | 
| Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 315 | }, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 316 | } | 
|  | 317 |  | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 318 | cc_test_library { | 
|  | 319 | name: "libBionicLoaderTests", | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 320 | defaults: [ | 
|  | 321 | "bionic_tests_defaults", | 
|  | 322 | "llvm-defaults", | 
|  | 323 | ], | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 324 | srcs: [ | 
|  | 325 | "atexit_test.cpp", | 
|  | 326 | "dl_test.cpp", | 
| Dimitry Ivanov | 708589f | 2016-09-19 10:50:28 -0700 | [diff] [blame] | 327 | "dlfcn_symlink_support.cpp", | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 328 | "dlfcn_test.cpp", | 
| Elliott Hughes | 7c10abb | 2017-04-21 17:15:41 -0700 | [diff] [blame] | 329 | "link_test.cpp", | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 330 | "pthread_dlfcn_test.cpp", | 
|  | 331 | ], | 
|  | 332 | static_libs: [ | 
|  | 333 | "libbase", | 
|  | 334 | ], | 
|  | 335 | include_dirs: [ | 
|  | 336 | "bionic/libc", | 
|  | 337 | ], | 
|  | 338 | shared: { | 
|  | 339 | enabled: false, | 
|  | 340 | }, | 
|  | 341 | target: { | 
|  | 342 | android: { | 
|  | 343 | srcs: [ | 
| Evgenii Stepanov | 0a3637d | 2016-07-06 13:20:59 -0700 | [diff] [blame] | 344 | "cfi_test.cpp", | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 345 | "dlext_test.cpp", | 
|  | 346 | "libdl_test.cpp", | 
|  | 347 | ], | 
|  | 348 | static_libs: [ | 
|  | 349 | "libpagemap", | 
| Andreas Gampe | b9797fe | 2017-07-05 22:36:20 -0700 | [diff] [blame] | 350 | "libziparchive", | 
| Dimitry Ivanov | ac4bd2f | 2016-11-21 12:50:38 -0800 | [diff] [blame] | 351 | "libLLVMObject", | 
|  | 352 | "libLLVMBitReader", | 
|  | 353 | "libLLVMMC", | 
|  | 354 | "libLLVMMCParser", | 
|  | 355 | "libLLVMCore", | 
|  | 356 | "libLLVMSupport", | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 357 | ], | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 358 | }, | 
| Jiyong Park | 02586a2 | 2017-05-20 01:01:24 +0900 | [diff] [blame] | 359 | }, | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 360 | } | 
|  | 361 |  | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 362 | // ----------------------------------------------------------------------------- | 
|  | 363 | // Library of bionic customized gtest main function, with normal gtest output format, | 
|  | 364 | // which is needed by bionic cts test. | 
|  | 365 | // ----------------------------------------------------------------------------- | 
|  | 366 | cc_test_library { | 
|  | 367 | name: "libBionicCtsGtestMain", | 
|  | 368 | defaults: ["bionic_tests_defaults"], | 
| Dimitry Ivanov | 927877c | 2016-09-21 11:17:13 -0700 | [diff] [blame] | 369 | srcs: [ | 
| Dimitry Ivanov | 927877c | 2016-09-21 11:17:13 -0700 | [diff] [blame] | 370 | "gtest_globals_cts.cpp", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 371 | "gtest_main.cpp", | 
| Dimitry Ivanov | 927877c | 2016-09-21 11:17:13 -0700 | [diff] [blame] | 372 | ], | 
| Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 373 | shared: { | 
|  | 374 | enabled: false, | 
|  | 375 | }, | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 376 | whole_static_libs: [ | 
|  | 377 | "libgtest_isolated", | 
|  | 378 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 379 | } | 
|  | 380 |  | 
|  | 381 | // ----------------------------------------------------------------------------- | 
|  | 382 | // Tests for the device using bionic's .so. Run with: | 
| Bernie Innocenti | b664724 | 2018-06-18 14:14:43 +0900 | [diff] [blame] | 383 | //   adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests | 
|  | 384 | //   adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 385 | // ----------------------------------------------------------------------------- | 
|  | 386 | cc_defaults { | 
|  | 387 | name: "bionic_unit_tests_defaults", | 
|  | 388 | host_supported: false, | 
|  | 389 |  | 
|  | 390 | whole_static_libs: [ | 
|  | 391 | "libBionicTests", | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 392 | "libBionicLoaderTests", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 393 | ], | 
|  | 394 |  | 
|  | 395 | static_libs: [ | 
|  | 396 | "libtinyxml2", | 
|  | 397 | "liblog", | 
|  | 398 | "libbase", | 
|  | 399 | ], | 
|  | 400 |  | 
|  | 401 | srcs: [ | 
|  | 402 | // 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] | 403 | "__cxa_thread_atexit_test.cpp", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 404 | "gtest_globals.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 405 | "thread_local_test.cpp", | 
|  | 406 | ], | 
|  | 407 |  | 
|  | 408 | conlyflags: [ | 
|  | 409 | "-fexceptions", | 
|  | 410 | "-fnon-call-exceptions", | 
|  | 411 | ], | 
|  | 412 |  | 
|  | 413 | ldflags: ["-Wl,--export-dynamic"], | 
|  | 414 |  | 
|  | 415 | include_dirs: ["bionic/libc"], | 
|  | 416 |  | 
| Yabin Cui | 1f553ea | 2017-01-13 12:31:59 -0800 | [diff] [blame] | 417 | stl: "libc++_static", | 
|  | 418 |  | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 419 | target: { | 
|  | 420 | android: { | 
|  | 421 | shared_libs: [ | 
| dimitry | 321476a | 2018-01-29 15:32:37 +0100 | [diff] [blame] | 422 | "ld-android", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 423 | "libdl", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 424 | "libdl_preempt_test_1", | 
|  | 425 | "libdl_preempt_test_2", | 
|  | 426 | "libdl_test_df_1_global", | 
|  | 427 | ], | 
|  | 428 | static_libs: [ | 
|  | 429 | // The order of these libraries matters, do not shuffle them. | 
|  | 430 | "libbase", | 
| Dimitry Ivanov | c462c28 | 2016-09-15 16:25:31 -0700 | [diff] [blame] | 431 | "libpagemap", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 432 | "libziparchive", | 
|  | 433 | "libz", | 
|  | 434 | "libutils", | 
| Dimitry Ivanov | ac4bd2f | 2016-11-21 12:50:38 -0800 | [diff] [blame] | 435 | "libLLVMObject", | 
|  | 436 | "libLLVMBitReader", | 
|  | 437 | "libLLVMMC", | 
|  | 438 | "libLLVMMCParser", | 
|  | 439 | "libLLVMCore", | 
|  | 440 | "libLLVMSupport", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 441 | ], | 
| Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 442 | ldflags: [ | 
| Colin Cross | 7b29495 | 2016-09-29 14:08:13 -0700 | [diff] [blame] | 443 | "-Wl,--rpath,${ORIGIN}/../bionic-loader-test-libs", | 
| Dimitry Ivanov | a36e59b | 2016-09-01 11:37:39 -0700 | [diff] [blame] | 444 | "-Wl,--enable-new-dtags", | 
|  | 445 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 446 | }, | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 447 | }, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 448 | } | 
|  | 449 |  | 
|  | 450 | cc_test { | 
|  | 451 | name: "bionic-unit-tests", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 452 | gtest: false, | 
| Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 453 | defaults: [ | 
|  | 454 | "bionic_unit_tests_defaults", | 
|  | 455 | "bionic_tests_defaults", | 
|  | 456 | ], | 
| Elliott Hughes | a57ca0d | 2016-11-17 18:18:08 -0800 | [diff] [blame] | 457 |  | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 458 | srcs: [ | 
|  | 459 | "gtest_main.cpp", | 
|  | 460 | ], | 
|  | 461 |  | 
|  | 462 | static_libs: [ | 
|  | 463 | "libgtest_isolated", | 
|  | 464 | ], | 
|  | 465 |  | 
| Elliott Hughes | a57ca0d | 2016-11-17 18:18:08 -0800 | [diff] [blame] | 466 | target: { | 
|  | 467 | android: { | 
|  | 468 | shared_libs: ["libicuuc"], | 
|  | 469 | }, | 
|  | 470 | }, | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 471 |  | 
|  | 472 | required: [ | 
|  | 473 | "cfi_test_helper", | 
|  | 474 | "cfi_test_helper2", | 
| Ryan Prichard | 8f639a4 | 2018-10-01 23:10:05 -0700 | [diff] [blame] | 475 | "exec_linker_helper", | 
|  | 476 | "exec_linker_helper_lib", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 477 | "libtest_dt_runpath_a", | 
|  | 478 | "libtest_dt_runpath_b", | 
|  | 479 | "libtest_dt_runpath_c", | 
|  | 480 | "libtest_dt_runpath_x", | 
|  | 481 | "libatest_simple_zip", | 
|  | 482 | "libcfi-test", | 
|  | 483 | "libcfi-test-bad", | 
|  | 484 | "libdlext_test_different_soname", | 
|  | 485 | "libdlext_test_fd", | 
|  | 486 | "libdlext_test_norelro", | 
|  | 487 | "libdlext_test_runpath_zip_zipaligned", | 
|  | 488 | "libdlext_test", | 
|  | 489 | "libdlext_test_zip", | 
|  | 490 | "libdlext_test_zip_zipaligned", | 
|  | 491 | "libdl_preempt_test_1", | 
|  | 492 | "libdl_preempt_test_2", | 
|  | 493 | "libdl_test_df_1_global", | 
| Pirama Arumuga Nainar | c53e8b8 | 2018-03-27 10:32:19 -0700 | [diff] [blame] | 494 | "libelf-tls-library", | 
| Dimitry Ivanov | f1db837 | 2017-04-19 11:58:52 -0700 | [diff] [blame] | 495 | "libgnu-hash-table-library", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 496 | "libsysv-hash-table-library", | 
| Pirama Arumuga Nainar | c53e8b8 | 2018-03-27 10:32:19 -0700 | [diff] [blame] | 497 | "libtestshared", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 498 | "libtest_atexit", | 
|  | 499 | "libtest_check_order_dlsym_1_left", | 
|  | 500 | "libtest_check_order_dlsym_2_right", | 
|  | 501 | "libtest_check_order_dlsym_3_c", | 
|  | 502 | "libtest_check_order_dlsym_a", | 
|  | 503 | "libtest_check_order_dlsym_b", | 
|  | 504 | "libtest_check_order_dlsym_d", | 
|  | 505 | "libtest_check_order_dlsym", | 
|  | 506 | "libtest_check_order_reloc_root_1", | 
|  | 507 | "libtest_check_order_reloc_root_2", | 
|  | 508 | "libtest_check_order_reloc_root", | 
|  | 509 | "libtest_check_order_reloc_siblings_1", | 
|  | 510 | "libtest_check_order_reloc_siblings_2", | 
|  | 511 | "libtest_check_order_reloc_siblings_3", | 
|  | 512 | "libtest_check_order_reloc_siblings_a", | 
|  | 513 | "libtest_check_order_reloc_siblings_b", | 
|  | 514 | "libtest_check_order_reloc_siblings_c_1", | 
|  | 515 | "libtest_check_order_reloc_siblings_c_2", | 
|  | 516 | "libtest_check_order_reloc_siblings_c", | 
|  | 517 | "libtest_check_order_reloc_siblings_d", | 
|  | 518 | "libtest_check_order_reloc_siblings_e", | 
|  | 519 | "libtest_check_order_reloc_siblings_f", | 
|  | 520 | "libtest_check_order_reloc_siblings", | 
|  | 521 | "libtest_check_rtld_next_from_library", | 
| Pirama Arumuga Nainar | c53e8b8 | 2018-03-27 10:32:19 -0700 | [diff] [blame] | 522 | "libtest_dlopen_df_1_global", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 523 | "libtest_dlopen_from_ctor_main", | 
|  | 524 | "libtest_dlopen_from_ctor", | 
|  | 525 | "libtest_dlopen_weak_undefined_func", | 
|  | 526 | "libtest_dlsym_df_1_global", | 
|  | 527 | "libtest_dlsym_from_this_child", | 
|  | 528 | "libtest_dlsym_from_this_grandchild", | 
|  | 529 | "libtest_dlsym_from_this", | 
|  | 530 | "libtest_dlsym_weak_func", | 
|  | 531 | "libtest_dt_runpath_d", | 
|  | 532 | "libtest_empty", | 
| Pirama Arumuga Nainar | c53e8b8 | 2018-03-27 10:32:19 -0700 | [diff] [blame] | 533 | "libtest_ifunc_variable_impl", | 
|  | 534 | "libtest_ifunc_variable", | 
| Dimitry Ivanov | f1db837 | 2017-04-19 11:58:52 -0700 | [diff] [blame] | 535 | "libtest_ifunc", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 536 | "libtest_init_fini_order_child", | 
|  | 537 | "libtest_init_fini_order_grand_child", | 
|  | 538 | "libtest_init_fini_order_root2", | 
|  | 539 | "libtest_init_fini_order_root", | 
| Pirama Arumuga Nainar | 1395f70 | 2018-03-28 15:27:12 -0700 | [diff] [blame] | 540 | "libtest_missing_symbol_child_public", | 
| Elliott Hughes | 06d31c9 | 2018-03-29 11:28:53 -0700 | [diff] [blame] | 541 | "libtest_missing_symbol_child_private", | 
| Pirama Arumuga Nainar | c53e8b8 | 2018-03-27 10:32:19 -0700 | [diff] [blame] | 542 | "libtest_missing_symbol_root", | 
|  | 543 | "libtest_missing_symbol", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 544 | "libtest_nodelete_1", | 
|  | 545 | "libtest_nodelete_2", | 
|  | 546 | "libtest_nodelete_dt_flags_1", | 
|  | 547 | "libtest_pthread_atfork", | 
|  | 548 | "libtest_relo_check_dt_needed_order_1", | 
|  | 549 | "libtest_relo_check_dt_needed_order_2", | 
|  | 550 | "libtest_relo_check_dt_needed_order", | 
|  | 551 | "libtest_simple", | 
|  | 552 | "libtest_two_parents_child", | 
|  | 553 | "libtest_two_parents_parent1", | 
|  | 554 | "libtest_two_parents_parent2", | 
|  | 555 | "libtest_versioned_lib", | 
|  | 556 | "libtest_versioned_libv1", | 
|  | 557 | "libtest_versioned_libv2", | 
|  | 558 | "libtest_versioned_otherlib_empty", | 
|  | 559 | "libtest_versioned_otherlib", | 
|  | 560 | "libtest_versioned_uselibv1", | 
|  | 561 | "libtest_versioned_uselibv2_other", | 
|  | 562 | "libtest_versioned_uselibv2", | 
|  | 563 | "libtest_versioned_uselibv3_other", | 
|  | 564 | "libtest_with_dependency_loop_a", | 
|  | 565 | "libtest_with_dependency_loop_b", | 
|  | 566 | "libtest_with_dependency_loop_c", | 
|  | 567 | "libtest_with_dependency_loop", | 
|  | 568 | "libtest_with_dependency", | 
| dimitry | 55547db | 2018-05-25 14:17:37 +0200 | [diff] [blame] | 569 | "libtest_indirect_thread_local_dtor", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 570 | "libtest_invalid-empty_shdr_table.so", | 
|  | 571 | "libtest_invalid-rw_load_segment.so", | 
|  | 572 | "libtest_invalid-unaligned_shdr_offset.so", | 
|  | 573 | "libtest_invalid-zero_shdr_table_content.so", | 
|  | 574 | "libtest_invalid-zero_shdr_table_offset.so", | 
|  | 575 | "libtest_invalid-zero_shentsize.so", | 
|  | 576 | "libtest_invalid-zero_shstrndx.so", | 
|  | 577 | "libtest_invalid-textrels.so", | 
|  | 578 | "libtest_invalid-textrels2.so", | 
| Pirama Arumuga Nainar | c53e8b8 | 2018-03-27 10:32:19 -0700 | [diff] [blame] | 579 | "libtest_thread_local_dtor", | 
| dimitry | 55547db | 2018-05-25 14:17:37 +0200 | [diff] [blame] | 580 | "libtest_thread_local_dtor2", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 581 | "preinit_getauxval_test_helper", | 
|  | 582 | "preinit_syscall_test_helper", | 
|  | 583 | "libnstest_private_external", | 
|  | 584 | "libnstest_dlopened", | 
|  | 585 | "libnstest_private", | 
|  | 586 | "libnstest_root_not_isolated", | 
|  | 587 | "libnstest_root", | 
|  | 588 | "libnstest_public", | 
|  | 589 | "libnstest_public_internal", | 
| Logan Chien | 9ee4591 | 2018-01-18 12:05:09 +0800 | [diff] [blame] | 590 | "libnstest_ns_a_public1", | 
|  | 591 | "libnstest_ns_a_public1_internal", | 
|  | 592 | "libnstest_ns_b_public2", | 
|  | 593 | "libnstest_ns_b_public3", | 
| Jiyong Park | ce10b16 | 2018-03-29 10:34:41 +0900 | [diff] [blame] | 594 | "ld_preload_test_helper", | 
|  | 595 | "ld_preload_test_helper_lib1", | 
| Elliott Hughes | 5146652 | 2018-03-29 11:17:37 -0700 | [diff] [blame] | 596 | "ld_preload_test_helper_lib2", | 
| Jiyong Park | ce10b16 | 2018-03-29 10:34:41 +0900 | [diff] [blame] | 597 | "ld_config_test_helper", | 
|  | 598 | "ld_config_test_helper_lib1", | 
|  | 599 | "ld_config_test_helper_lib2", | 
|  | 600 | "ld_config_test_helper_lib3", | 
| Dimitry Ivanov | 4bd3542 | 2017-04-10 16:52:25 -0700 | [diff] [blame] | 601 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 602 | } | 
|  | 603 |  | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 604 | // ----------------------------------------------------------------------------- | 
|  | 605 | // Tests for the device linked against bionic's static library. Run with: | 
| Bernie Innocenti | b664724 | 2018-06-18 14:14:43 +0900 | [diff] [blame] | 606 | //   adb shell /data/nativetest/bionic-unit-tests-static/bionic-unit-tests-static | 
|  | 607 | //   adb shell /data/nativetest64/bionic-unit-tests-static/bionic-unit-tests-static | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 608 | // ----------------------------------------------------------------------------- | 
|  | 609 | cc_test { | 
|  | 610 | name: "bionic-unit-tests-static", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 611 | gtest: false, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 612 | defaults: ["bionic_tests_defaults"], | 
|  | 613 | host_supported: false, | 
|  | 614 |  | 
| Dimitry Ivanov | 462ea66 | 2017-01-06 14:49:57 -0800 | [diff] [blame] | 615 | srcs: [ | 
|  | 616 | "gtest_preinit_debuggerd.cpp", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 617 | "gtest_globals.cpp", | 
|  | 618 | "gtest_main.cpp", | 
| Dimitry Ivanov | 462ea66 | 2017-01-06 14:49:57 -0800 | [diff] [blame] | 619 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 620 | whole_static_libs: [ | 
|  | 621 | "libBionicTests", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 622 | ], | 
|  | 623 |  | 
|  | 624 | static_libs: [ | 
|  | 625 | "libm", | 
|  | 626 | "libc", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 627 | "libdl", | 
|  | 628 | "libtinyxml2", | 
|  | 629 | "liblog", | 
|  | 630 | "libbase", | 
| Josh Gao | 2a3b4fa | 2016-10-26 17:55:49 -0700 | [diff] [blame] | 631 | "libdebuggerd_handler", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 632 | "libgtest_isolated", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 633 | ], | 
|  | 634 |  | 
|  | 635 | static_executable: true, | 
|  | 636 | stl: "libc++_static", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 637 | } | 
|  | 638 |  | 
|  | 639 | // ----------------------------------------------------------------------------- | 
|  | 640 | // Tests to run on the host and linked against glibc. Run with: | 
|  | 641 | //   cd bionic/tests; mm bionic-unit-tests-glibc-run | 
|  | 642 | // ----------------------------------------------------------------------------- | 
|  | 643 |  | 
|  | 644 | cc_test_host { | 
|  | 645 | name: "bionic-unit-tests-glibc", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 646 | gtest: false, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 647 | defaults: ["bionic_tests_defaults"], | 
|  | 648 |  | 
|  | 649 | srcs: [ | 
|  | 650 | "atexit_test.cpp", | 
| Dimitry Ivanov | 708589f | 2016-09-19 10:50:28 -0700 | [diff] [blame] | 651 | "dlfcn_symlink_support.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 652 | "dlfcn_test.cpp", | 
|  | 653 | "dl_test.cpp", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 654 | "gtest_globals.cpp", | 
|  | 655 | "gtest_main.cpp", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 656 | "pthread_dlfcn_test.cpp", | 
|  | 657 | ], | 
|  | 658 |  | 
|  | 659 | shared_libs: [ | 
|  | 660 | "libdl_preempt_test_1", | 
|  | 661 | "libdl_preempt_test_2", | 
|  | 662 |  | 
|  | 663 | "libdl_test_df_1_global", | 
|  | 664 | ], | 
|  | 665 |  | 
|  | 666 | whole_static_libs: [ | 
|  | 667 | "libBionicStandardTests", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 668 | "libfortify1-tests-clang", | 
|  | 669 | "libfortify2-tests-clang", | 
|  | 670 | ], | 
|  | 671 |  | 
|  | 672 | static_libs: [ | 
|  | 673 | "libbase", | 
|  | 674 | "liblog", | 
|  | 675 | "libcutils", | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 676 | "libgtest_isolated", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 677 | ], | 
|  | 678 |  | 
|  | 679 | host_ldlibs: [ | 
|  | 680 | "-lresolv", | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 681 | "-lutil", | 
|  | 682 | ], | 
|  | 683 |  | 
| Christopher Ferris | 6d2c0bd | 2018-08-21 18:13:10 -0700 | [diff] [blame] | 684 | include_dirs: [ | 
|  | 685 | "bionic/libc", | 
|  | 686 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 687 |  | 
| Dimitry Ivanov | d0b5c3a | 2016-11-25 12:23:11 -0800 | [diff] [blame] | 688 | ldflags: [ | 
|  | 689 | "-Wl,--rpath,${ORIGIN}/../bionic-loader-test-libs", | 
|  | 690 | "-Wl,--export-dynamic", | 
|  | 691 | ], | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 692 |  | 
|  | 693 | sanitize: { | 
|  | 694 | never: false, | 
|  | 695 | }, | 
| Dan Willemsen | 268ae36 | 2017-09-21 16:56:06 -0700 | [diff] [blame] | 696 |  | 
|  | 697 | target: { | 
|  | 698 | linux_bionic: { | 
|  | 699 | enabled: false, | 
|  | 700 | }, | 
|  | 701 | }, | 
| Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 702 | } | 
|  | 703 |  | 
| Elliott Hughes | 21b56eb | 2017-10-20 17:57:17 -0700 | [diff] [blame] | 704 | subdirs = ["*"] |