1# Copyright (c) 2022 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("../../../test_template.gni") 15import("test_src_functionalext_supplement.gni") 16 17group("functionalext_supplement_test") { 18 testonly = true 19 deps = [] 20 21 foreach(s, functionalext_supplement_list) { 22 deps += [ "${s}" ] 23 } 24} 25 26config("module_private_config") { 27 visibility = [ ":*" ] 28} 29 30ohos_executable("musl_unittest") { 31 testonly = true 32 subsystem_name = "musl" 33 part_name = "libc-gtest" 34 35 sources = [ 36 "conf/conf_gtest/conf_confstr_test.cpp", 37 "conf/conf_gtest/conf_get_nprocs_test.cpp", 38 "conf/conf_gtest/conf_get_npros_conf_test.cpp", 39 "conf/conf_gtest/conf_sysconf_test.cpp", 40 "ctype/ctype_gtest/ctype_isalnum_test.cpp", 41 "ctype/ctype_gtest/ctype_isspace_test.cpp", 42 "ctype/ctype_gtest/ctype_isupper_l_test.cpp", 43 "ctype/ctype_gtest/ctype_tolower_l_test.cpp", 44 "ctype/ctype_gtest/ctype_tolower_test.cpp", 45 "ctype/ctype_gtest/ctype_toupper_l_test.cpp", 46 "ctype/ctype_gtest/ctype_toupper_test.cpp", 47 "ctype/ctype_gtest/ctype_towctrans_l_test.cpp", 48 "ctype/ctype_gtest/ctype_towupper_l_test.cpp", 49 "ctype/ctype_gtest/ctype_towupper_test.cpp", 50 "dirent/dirent_gtest/dirent_alphasort64_test.cpp", 51 "dirent/dirent_gtest/dirent_closedir_test.cpp", 52 "dirent/dirent_gtest/dirent_opendir_test.cpp", 53 "dirent/dirent_gtest/dirent_readdir64_test.cpp", 54 "dirent/dirent_gtest/dirent_scandir_test.cpp", 55 "env/env_gtest/env_getenv_test.cpp", 56 "exit/exit_gtest/exit_abort_test.cpp", 57 "exit/exit_gtest/exit_assert_fail_test.cpp", 58 "exit/exit_gtest/exit_cxa_atexit_test.cpp", 59 "exit/exit_gtest/exit_quick_exit_test.cpp", 60 "fcntl/fcntl_gtest/fcntl_fcntl_test.cpp", 61 "fcntl/fcntl_gtest/fcntl_open64_test.cpp", 62 "fcntl/fcntl_gtest/fcntl_posix_fadvise64_test.cpp", 63 "fcntl/fcntl_gtest/fcntl_posix_fallocate64_test.cpp", 64 "fenv/fenv_gtest/fenv_fegetround_test.cpp", 65 "fortify/fortify_gtest/fortify_fgets_chk_test.cpp", 66 "fortify/fortify_gtest/fortify_fwrite_chk_test.cpp", 67 "fortify/fortify_gtest/fortify_memchr_chk_test.cpp", 68 "fortify/fortify_gtest/fortify_memcpy_chk_test.cpp", 69 "fortify/fortify_gtest/fortify_mempcpy_chk_test.cpp", 70 "fortify/fortify_gtest/fortify_memrchr_chk_test.cpp", 71 "fortify/fortify_gtest/fortify_open64_chk_test.cpp", 72 "fortify/fortify_gtest/fortify_open_chk_test.cpp", 73 "fortify/fortify_gtest/fortify_openat64_chk_test.cpp", 74 "fortify/fortify_gtest/fortify_openat_chk_test.cpp", 75 "fortify/fortify_gtest/fortify_poll_chk_test.cpp", 76 "fortify/fortify_gtest/fortify_ppoll_chk_test.cpp", 77 "fortify/fortify_gtest/fortify_pread_chk_test.cpp", 78 "fortify/fortify_gtest/fortify_pwrite_chk_test.cpp", 79 "fortify/fortify_gtest/fortify_read_chk_test.cpp", 80 "fortify/fortify_gtest/fortify_readlinkat_chk_test.cpp", 81 "fortify/fortify_gtest/fortify_recv_chk_test.cpp", 82 "fortify/fortify_gtest/fortify_sendto_chk_test.cpp", 83 "fortify/fortify_gtest/fortify_snprintf_chk_test.cpp", 84 "fortify/fortify_gtest/fortify_sprintf_chk_test.cpp", 85 "fortify/fortify_gtest/fortify_stpcpy_chk_test.cpp", 86 "fortify/fortify_gtest/fortify_strcat_chk_test.cpp", 87 "fortify/fortify_gtest/fortify_strchr_chk_test.cpp", 88 "fortify/fortify_gtest/fortify_strcpy_chk_test.cpp", 89 "fortify/fortify_gtest/fortify_strlcat_chk_test.cpp", 90 "fortify/fortify_gtest/fortify_strlcpy_chk_test.cpp", 91 "fortify/fortify_gtest/fortify_strlen_chk_test.cpp", 92 "fortify/fortify_gtest/fortify_strncpy_chk_test.cpp", 93 "fortify/fortify_gtest/fortify_strrchr_chk_test.cpp", 94 "fortify/fortify_gtest/fortify_umask_chk_test.cpp", 95 "fortify/fortify_gtest/fortify_vsnprintf_chk_test.cpp", 96 "fortify/fortify_gtest/fortify_vsprintf_chk_test.cpp", 97 "fortify/fortify_gtest/fortify_write_chk_test.cpp", 98 "hook/hook_gtest/hook_memtrace_test.cpp", 99 "hook/hook_gtest/hook_munmap_test.cpp", 100 "hook/hook_gtest/hook_realloc_test.cpp", 101 "legacy/legacy_gtest/legacy_endutent_test.cpp", 102 "legacy/legacy_gtest/legacy_getutent_test.cpp", 103 "legacy/legacy_gtest/legacy_utmpname_test.cpp", 104 "linux/linux_gtest/linux_delete_module_test.cpp", 105 "linux/linux_gtest/linux_init_module_test.cpp", 106 "linux/linux_gtest/linux_pivot_root_test.cpp", 107 "linux/linux_gtest/linux_umount2_test.cpp", 108 "linux/linux_gtest/linux_unshare_test.cpp", 109 "locale/locale_gtest/locale_catopen_test.cpp", 110 "locale/locale_gtest/locale_duplocale_test.cpp", 111 112 # ldso unittest 113 "ldso/ldso_gtest/ldso_cfi_test.cpp", 114 "ldso/ldso_gtest/ldso_dl_iterate_phdr_test.cpp", 115 "ldso/ldso_gtest/ldso_dladdr_test.cpp", 116 "ldso/ldso_gtest/ldso_dlclose_test.cpp", 117 "ldso/ldso_gtest/ldso_dlerror_test.cpp", 118 "ldso/ldso_gtest/ldso_dlns_create_test.cpp", 119 "ldso/ldso_gtest/ldso_dlns_inherit_test.cpp", 120 "ldso/ldso_gtest/ldso_dlopen_ext_test.cpp", 121 "ldso/ldso_gtest/ldso_dlopen_ns_test.cpp", 122 "ldso/ldso_gtest/ldso_dlopen_test.cpp", 123 "ldso/ldso_gtest/ldso_dlsym_test.cpp", 124 "legacy/legacy_gtest/legacy_getpagesize_test.cpp", 125 "linux/linux_gtest/linux_epoll_create1_test.cpp", 126 "linux/linux_gtest/linux_epoll_create_test.cpp", 127 "linux/linux_gtest/linux_epoll_ctl_test.cpp", 128 "linux/linux_gtest/linux_epoll_wait_test.cpp", 129 "linux/linux_gtest/linux_eventfd_test.cpp", 130 "linux/linux_gtest/linux_getrandom_test.cpp", 131 "linux/linux_gtest/linux_gettid_test.cpp", 132 "linux/linux_gtest/linux_getxattr_test.cpp", 133 "linux/linux_gtest/linux_inotify_add_watch_test.cpp", 134 "linux/linux_gtest/linux_inotify_init_test.cpp", 135 "linux/linux_gtest/linux_prctl_test.cpp", 136 "linux/linux_gtest/linux_setxattr_test.cpp", 137 "linux/linux_gtest/linux_timerfd_create_test.cpp", 138 "linux/linux_gtest/linux_timerfd_settime_test.cpp", 139 "locale/locale_gtest/locale_localeconv_test.cpp", 140 "locale/locale_gtest/locale_newlocale_test.cpp", 141 "locale/locale_gtest/locale_nl_langinfo_l_test.cpp", 142 "locale/locale_gtest/locale_strtof_l_test.cpp", 143 "locale/locale_gtest/locale_uselocale_test.cpp", 144 "malloc/malloc_gtest/malloc_calloc_test.cpp", 145 "malloc/malloc_gtest/malloc_free_test.cpp", 146 "malloc/malloc_gtest/malloc_malloc_test.cpp", 147 "malloc/malloc_gtest/malloc_malloc_usable_size_test.cpp", 148 149 # math unittest 150 "math/math_gtest/complex_test.cpp", 151 "math/math_gtest/math_acos_test.cpp", 152 "math/math_gtest/math_acosh_test.cpp", 153 "math/math_gtest/math_asin_test.cpp", 154 "math/math_gtest/math_asinh_test.cpp", 155 "math/math_gtest/math_atan2_test.cpp", 156 "math/math_gtest/math_atan_test.cpp", 157 "math/math_gtest/math_atanh_test.cpp", 158 "math/math_gtest/math_cbrt_test.cpp", 159 "math/math_gtest/math_ceil_test.cpp", 160 "math/math_gtest/math_copysign_test.cpp", 161 "math/math_gtest/math_cos_test.cpp", 162 "math/math_gtest/math_cosh_test.cpp", 163 "math/math_gtest/math_data_test.cpp", 164 "math/math_gtest/math_drem_test.cpp", 165 "math/math_gtest/math_erf_test.cpp", 166 "math/math_gtest/math_erfc_test.cpp", 167 "math/math_gtest/math_exp2_test.cpp", 168 "math/math_gtest/math_exp_test.cpp", 169 "math/math_gtest/math_expm1_test.cpp", 170 "math/math_gtest/math_fabs_test.cpp", 171 "math/math_gtest/math_fdim_test.cpp", 172 "math/math_gtest/math_finite_test.cpp", 173 "math/math_gtest/math_floor_test.cpp", 174 "math/math_gtest/math_fma_test.cpp", 175 "math/math_gtest/math_fmax_test.cpp", 176 "math/math_gtest/math_fmin_test.cpp", 177 "math/math_gtest/math_fmod_test.cpp", 178 "math/math_gtest/math_frexp_test.cpp", 179 "math/math_gtest/math_hypot_test.cpp", 180 "math/math_gtest/math_ilogb_test.cpp", 181 "math/math_gtest/math_j0_test.cpp", 182 "math/math_gtest/math_j1_test.cpp", 183 "math/math_gtest/math_jn_test.cpp", 184 "math/math_gtest/math_ldexp_test.cpp", 185 "math/math_gtest/math_lgamma_r_test.cpp", 186 "math/math_gtest/math_lgamma_test.cpp", 187 "math/math_gtest/math_llrint_test.cpp", 188 "math/math_gtest/math_log10_test.cpp", 189 "math/math_gtest/math_log1p_test.cpp", 190 "math/math_gtest/math_log2_test.cpp", 191 "math/math_gtest/math_log_test.cpp", 192 "math/math_gtest/math_logb_test.cpp", 193 "math/math_gtest/math_lrint_test.cpp", 194 "math/math_gtest/math_modf_test.cpp", 195 "math/math_gtest/math_nearbyint_test.cpp", 196 "math/math_gtest/math_nextafter_test.cpp", 197 "math/math_gtest/math_nexttoward_test.cpp", 198 "math/math_gtest/math_pow_test.cpp", 199 "math/math_gtest/math_remainder_test.cpp", 200 "math/math_gtest/math_remquo_test.cpp", 201 "math/math_gtest/math_rint_test.cpp", 202 "math/math_gtest/math_round_test.cpp", 203 "math/math_gtest/math_scalb_test.cpp", 204 "math/math_gtest/math_scalbn_test.cpp", 205 "math/math_gtest/math_signbit_test.cpp", 206 "math/math_gtest/math_significand_test.cpp", 207 "math/math_gtest/math_sin_test.cpp", 208 "math/math_gtest/math_sincos_test.cpp", 209 "math/math_gtest/math_sinh_test.cpp", 210 "math/math_gtest/math_sqrt_test.cpp", 211 "math/math_gtest/math_tan_test.cpp", 212 "math/math_gtest/math_tanh_test.cpp", 213 "math/math_gtest/math_tgamma_test.cpp", 214 "math/math_gtest/math_trunc_test.cpp", 215 "math/math_gtest/math_y0_test.cpp", 216 "math/math_gtest/math_y1_test.cpp", 217 "math/math_gtest/math_yn_test.cpp", 218 "misc/misc_gtest/misc_basename_test.cpp", 219 "misc/misc_gtest/misc_closelog_test.cpp", 220 "misc/misc_gtest/misc_dirname_test.cpp", 221 "misc/misc_gtest/misc_getentropy_test.cpp", 222 "misc/misc_gtest/misc_getpriority_test.cpp", 223 "misc/misc_gtest/misc_getrlimit64_test.cpp", 224 "misc/misc_gtest/misc_ioctl_test.cpp", 225 "misc/misc_gtest/misc_nftw64_test.cpp", 226 "misc/misc_gtest/misc_realpath_test.cpp", 227 "misc/misc_gtest/misc_setpriority_test.cpp", 228 "misc/misc_gtest/misc_syscall_test.cpp", 229 "misc/misc_gtest/misc_uname_test.cpp", 230 "mman/mman_gtest/mman_madvise_test.cpp", 231 "mman/mman_gtest/mman_mmap_test.cpp", 232 "mman/mman_gtest/mman_mprotect_test.cpp", 233 "mman/mman_gtest/mman_msync_test.cpp", 234 "multibyte/multibyte_gtest/multibyte_mbrtowc_test.cpp", 235 "network/network_gtest/arpa_inet_test.cpp", 236 "network/network_gtest/endian_test.cpp", 237 "network/network_gtest/fortify_test.cpp", 238 "network/network_gtest/net_if_test.cpp", 239 "network/network_gtest/netdb_test.cpp", 240 "network/network_gtest/netinet_ether_test.cpp", 241 "network/network_gtest/network_herror_test.cpp", 242 "network/network_gtest/network_res_search_test.cpp", 243 "network/network_gtest/resolv_test.cpp", 244 "network/network_gtest/socket_test.cpp", 245 "passwd/passwd_gtest/passwd_endgrent_test.cpp", 246 "prng/prng_gtest/prng_rand_r_test.cpp", 247 "prng/prng_gtest/prng_rand_test.cpp", 248 "process/process_gtest/process_unsetenv_test.cpp", 249 "regex/regex_gtest/regex_fnmatch_test.cpp", 250 "search/search_gtest/search_tdelete_test.cpp", 251 "search/search_gtest/search_tfind_test.cpp", 252 "select/select_gtest/select_poll_test.cpp", 253 "setjmp/setjmp_gtest/setjmp_setjmp_test.cpp", 254 "sigchain/sigchain_gtest/sigchain_add_special_signal_handler_test.cpp", 255 "signal/signal_gtest/signal_sigaddset_test.cpp", 256 "signal/signal_gtest/signal_sigemptyset_test.cpp", 257 "signal/signal_gtest/signal_sigtimedwait_test.cpp", 258 "signal/signal_gtest/signal_sysv_signal_test.cpp", 259 "stat/stat_gtest/stat_chmod_test.cpp", 260 "stat/stat_gtest/stat_fstat64_test.cpp", 261 "stat/stat_gtest/stat_fstat_test.cpp", 262 "stat/stat_gtest/stat_fstatat64_test.cpp", 263 "stat/stat_gtest/stat_fstatat_test.cpp", 264 "stat/stat_gtest/stat_fstatfs64_test.cpp", 265 "stat/stat_gtest/stat_lstat_test.cpp", 266 "stat/stat_gtest/stat_mkdir_test.cpp", 267 "stat/stat_gtest/stat_stat_test.cpp", 268 "stat/stat_gtest/stat_statvfs64_test.cpp", 269 "stat/stat_gtest/stat_umask_test.cpp", 270 "stdio/stdio_gtest/stdio_clearerr_unlocked_test.cpp", 271 "stdio/stdio_gtest/stdio_feof_unlocked_test.cpp", 272 "stdio/stdio_gtest/stdio_ferror_test.cpp", 273 "stdio/stdio_gtest/stdio_ferror_unlocked_test.cpp", 274 "stdio/stdio_gtest/stdio_fflush_unlocked_test.cpp", 275 "stdio/stdio_gtest/stdio_fgetpos64_test.cpp", 276 "stdio/stdio_gtest/stdio_fileno_unlocked_test.cpp", 277 "stdio/stdio_gtest/stdio_fpurge_test.cpp", 278 "stdio/stdio_gtest/stdio_fputc_unlocked_test.cpp", 279 "stdio/stdio_gtest/stdio_fsetlocking_test.cpp", 280 "stdio/stdio_gtest/stdio_gets_test.cpp", 281 "stdio/stdio_gtest/stdio_getwchar_test.cpp", 282 "stdio/stdio_gtest/stdio_perror_test.cpp", 283 "stdlib/stdlib_gtest/stdlib_arc4random_test.cpp", 284 "stdlib/stdlib_gtest/stdlib_div_test.cpp", 285 "string/string_gtest/string_bcmp_test.cpp", 286 "string/string_gtest/string_bcopy_test.cpp", 287 "string/string_gtest/string_memchr_test.cpp", 288 "string/string_gtest/string_memcmp_test.cpp", 289 "string/string_gtest/string_memcpy_test.cpp", 290 "string/string_gtest/string_memrchr_test.cpp", 291 "string/string_gtest/string_memset_test.cpp", 292 "string/string_gtest/string_strcasecmp_test.cpp", 293 "string/string_gtest/string_strcat_test.cpp", 294 "string/string_gtest/string_strchr_test.cpp", 295 "string/string_gtest/string_strcmp_test.cpp", 296 "string/string_gtest/string_strcpy_test.cpp", 297 "string/string_gtest/string_strcspn_test.cpp", 298 "string/string_gtest/string_strdup_test.cpp", 299 "string/string_gtest/string_strlen_test.cpp", 300 "string/string_gtest/string_strncasecmp_test.cpp", 301 "string/string_gtest/string_strncmp_test.cpp", 302 "string/string_gtest/string_strncpy_test.cpp", 303 "string/string_gtest/string_strnlen_test.cpp", 304 "string/string_gtest/string_strpbrk_test.cpp", 305 "string/string_gtest/string_strrchr_test.cpp", 306 "string/string_gtest/string_strspn_test.cpp", 307 "string/string_gtest/string_strstr_test.cpp", 308 "string/string_gtest/string_wmemchr_test.cpp", 309 "string/string_gtest/string_wmemcmp_test.cpp", 310 "temp/temp_gtest/temp_mkostemp64_test.cpp", 311 "temp/temp_gtest/temp_mkstemp64_test.cpp", 312 "temp/temp_gtest/temp_mkstemps64_test.cpp", 313 "thread/thread_gtest/pthread_attr_test.cpp", 314 "thread/thread_gtest/pthread_barrier_test.cpp", 315 "thread/thread_gtest/pthread_cleanup_test.cpp", 316 "thread/thread_gtest/pthread_cond_test.cpp", 317 "thread/thread_gtest/pthread_key_test.cpp", 318 "thread/thread_gtest/pthread_spin_test.cpp", 319 "thread/thread_gtest/thread_callonce_test.cpp", 320 "thread/thread_gtest/thread_cnd_test.cpp", 321 "thread/thread_gtest/thread_mutex_test.cpp", 322 "thread/thread_gtest/thread_mutexattr_test.cpp", 323 "thread/thread_gtest/thread_pthrd_test.cpp", 324 "thread/thread_gtest/thread_rwlock_test.cpp", 325 "thread/thread_gtest/thread_sem_test.cpp", 326 "thread/thread_gtest/thread_thrd_test.cpp", 327 "thread/thread_gtest/thread_tls_get_addr_test.cpp", 328 "thread/thread_gtest/thread_tss_test.cpp", 329 "time/time_gtest/sys_clock_test.cpp", 330 "time/time_gtest/time_daylight_test.cpp", 331 "time/time_gtest/time_ftime_test.cpp", 332 "time/time_gtest/time_test.cpp", 333 "time/time_gtest/time_timezone_test.cpp", 334 "time/time_gtest/time_tzname_test.cpp", 335 "time/time_gtest/time_tzset_test.cpp", 336 "time/time_gtest/timer_test.cpp", 337 "unistd/unistd_gtest/unistd_Exit_test.cpp", 338 "unistd/unistd_gtest/unistd_access_test.cpp", 339 "unistd/unistd_gtest/unistd_dup2_test.cpp", 340 "unistd/unistd_gtest/unistd_dup_test.cpp", 341 "unistd/unistd_gtest/unistd_fdatasync_test.cpp", 342 "unistd/unistd_gtest/unistd_fsync_test.cpp", 343 "unistd/unistd_gtest/unistd_ftruncate64_test.cpp", 344 "unistd/unistd_gtest/unistd_getid_test.cpp", 345 "unistd/unistd_gtest/unistd_pipe2_test.cpp", 346 "unistd/unistd_gtest/unistd_pipe_test.cpp", 347 "unistd/unistd_gtest/unistd_pread64_test.cpp", 348 "unistd/unistd_gtest/unistd_pwrite64_test.cpp", 349 "unistd/unistd_gtest/unistd_read_test.cpp", 350 "unistd/unistd_gtest/unistd_readlink_test.cpp", 351 "unistd/unistd_gtest/unistd_rmdir_test.cpp", 352 "unistd/unistd_gtest/unistd_unlink_test.cpp", 353 "unistd/unistd_gtest/unistd_usleep_test.cpp", 354 "unistd/unistd_gtest/unistd_write_test.cpp", 355 "unistd/unistd_gtest/unistd_writev_test.cpp", 356 ] 357 358 ldflags = [ 359 "-Wl,-rpath=/data/tmp/libcgtest/libs:/data/tmp/libcgtest/libs/rpath-test/", 360 ] 361 362 include_dirs = [ "//third_party/musl" ] 363 configs = [ ":module_private_config" ] 364 365 if (use_pthread_cancel) { 366 cflags += [ "-DFEATURE_PTHREAD_CANCEL" ] 367 } 368 deps = [ "//third_party/googletest:gtest_main" ] 369} 370