# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("../../../test_template.gni") import("test_src_functionalext_supplement.gni") group("functionalext_supplement_test") { testonly = true deps = [] foreach(s, functionalext_supplement_list) { deps += [ "${s}" ] } } config("module_private_config") { visibility = [ ":*" ] } ohos_executable("musl_unittest") { testonly = true subsystem_name = "musl" part_name = "libc-gtest" sources = [ "conf/conf_gtest/conf_confstr_test.cpp", "conf/conf_gtest/conf_get_nprocs_test.cpp", "conf/conf_gtest/conf_get_npros_conf_test.cpp", "conf/conf_gtest/conf_sysconf_test.cpp", "ctype/ctype_gtest/ctype_isalnum_test.cpp", "ctype/ctype_gtest/ctype_isspace_test.cpp", "ctype/ctype_gtest/ctype_isupper_l_test.cpp", "ctype/ctype_gtest/ctype_tolower_l_test.cpp", "ctype/ctype_gtest/ctype_tolower_test.cpp", "ctype/ctype_gtest/ctype_toupper_l_test.cpp", "ctype/ctype_gtest/ctype_toupper_test.cpp", "ctype/ctype_gtest/ctype_towctrans_l_test.cpp", "ctype/ctype_gtest/ctype_towupper_l_test.cpp", "ctype/ctype_gtest/ctype_towupper_test.cpp", "dirent/dirent_gtest/dirent_alphasort64_test.cpp", "dirent/dirent_gtest/dirent_closedir_test.cpp", "dirent/dirent_gtest/dirent_opendir_test.cpp", "dirent/dirent_gtest/dirent_readdir64_test.cpp", "dirent/dirent_gtest/dirent_scandir_test.cpp", "env/env_gtest/env_getenv_test.cpp", "exit/exit_gtest/exit_abort_test.cpp", "exit/exit_gtest/exit_assert_fail_test.cpp", "exit/exit_gtest/exit_cxa_atexit_test.cpp", "exit/exit_gtest/exit_quick_exit_test.cpp", "fcntl/fcntl_gtest/fcntl_fcntl_test.cpp", "fcntl/fcntl_gtest/fcntl_open64_test.cpp", "fcntl/fcntl_gtest/fcntl_posix_fadvise64_test.cpp", "fcntl/fcntl_gtest/fcntl_posix_fallocate64_test.cpp", "fenv/fenv_gtest/fenv_fegetround_test.cpp", "fortify/fortify_gtest/fortify_fgets_chk_test.cpp", "fortify/fortify_gtest/fortify_fwrite_chk_test.cpp", "fortify/fortify_gtest/fortify_memchr_chk_test.cpp", "fortify/fortify_gtest/fortify_memcpy_chk_test.cpp", "fortify/fortify_gtest/fortify_mempcpy_chk_test.cpp", "fortify/fortify_gtest/fortify_memrchr_chk_test.cpp", "fortify/fortify_gtest/fortify_open64_chk_test.cpp", "fortify/fortify_gtest/fortify_open_chk_test.cpp", "fortify/fortify_gtest/fortify_openat64_chk_test.cpp", "fortify/fortify_gtest/fortify_openat_chk_test.cpp", "fortify/fortify_gtest/fortify_poll_chk_test.cpp", "fortify/fortify_gtest/fortify_ppoll_chk_test.cpp", "fortify/fortify_gtest/fortify_pread_chk_test.cpp", "fortify/fortify_gtest/fortify_pwrite_chk_test.cpp", "fortify/fortify_gtest/fortify_read_chk_test.cpp", "fortify/fortify_gtest/fortify_readlinkat_chk_test.cpp", "fortify/fortify_gtest/fortify_recv_chk_test.cpp", "fortify/fortify_gtest/fortify_sendto_chk_test.cpp", "fortify/fortify_gtest/fortify_snprintf_chk_test.cpp", "fortify/fortify_gtest/fortify_sprintf_chk_test.cpp", "fortify/fortify_gtest/fortify_stpcpy_chk_test.cpp", "fortify/fortify_gtest/fortify_strcat_chk_test.cpp", "fortify/fortify_gtest/fortify_strchr_chk_test.cpp", "fortify/fortify_gtest/fortify_strcpy_chk_test.cpp", "fortify/fortify_gtest/fortify_strlcat_chk_test.cpp", "fortify/fortify_gtest/fortify_strlcpy_chk_test.cpp", "fortify/fortify_gtest/fortify_strlen_chk_test.cpp", "fortify/fortify_gtest/fortify_strncpy_chk_test.cpp", "fortify/fortify_gtest/fortify_strrchr_chk_test.cpp", "fortify/fortify_gtest/fortify_umask_chk_test.cpp", "fortify/fortify_gtest/fortify_vsnprintf_chk_test.cpp", "fortify/fortify_gtest/fortify_vsprintf_chk_test.cpp", "fortify/fortify_gtest/fortify_write_chk_test.cpp", "hook/hook_gtest/hook_memtrace_test.cpp", "hook/hook_gtest/hook_munmap_test.cpp", "hook/hook_gtest/hook_realloc_test.cpp", "legacy/legacy_gtest/legacy_endutent_test.cpp", "legacy/legacy_gtest/legacy_getutent_test.cpp", "legacy/legacy_gtest/legacy_utmpname_test.cpp", "linux/linux_gtest/linux_delete_module_test.cpp", "linux/linux_gtest/linux_init_module_test.cpp", "linux/linux_gtest/linux_pivot_root_test.cpp", "linux/linux_gtest/linux_umount2_test.cpp", "linux/linux_gtest/linux_unshare_test.cpp", "locale/locale_gtest/locale_catopen_test.cpp", "locale/locale_gtest/locale_duplocale_test.cpp", # ldso unittest "ldso/ldso_gtest/cxa_thread_atexit_test.cpp", "ldso/ldso_gtest/ldso_cfi_test.cpp", "ldso/ldso_gtest/ldso_dl_iterate_phdr_test.cpp", "ldso/ldso_gtest/ldso_dladdr_test.cpp", "ldso/ldso_gtest/ldso_dlclose_test.cpp", "ldso/ldso_gtest/ldso_dlerror_test.cpp", "ldso/ldso_gtest/ldso_dlns_create_test.cpp", "ldso/ldso_gtest/ldso_dlns_inherit_test.cpp", "ldso/ldso_gtest/ldso_dlopen_ext_test.cpp", "ldso/ldso_gtest/ldso_dlopen_ns_test.cpp", "ldso/ldso_gtest/ldso_dlopen_test.cpp", "ldso/ldso_gtest/ldso_dlsym_test.cpp", "legacy/legacy_gtest/legacy_getpagesize_test.cpp", "linux/linux_gtest/linux_epoll_create1_test.cpp", "linux/linux_gtest/linux_epoll_create_test.cpp", "linux/linux_gtest/linux_epoll_ctl_test.cpp", "linux/linux_gtest/linux_epoll_wait_test.cpp", "linux/linux_gtest/linux_eventfd_test.cpp", "linux/linux_gtest/linux_getrandom_test.cpp", "linux/linux_gtest/linux_gettid_test.cpp", "linux/linux_gtest/linux_getxattr_test.cpp", "linux/linux_gtest/linux_inotify_add_watch_test.cpp", "linux/linux_gtest/linux_inotify_init_test.cpp", "linux/linux_gtest/linux_prctl_test.cpp", "linux/linux_gtest/linux_setxattr_test.cpp", "linux/linux_gtest/linux_timerfd_create_test.cpp", "linux/linux_gtest/linux_timerfd_settime_test.cpp", "locale/locale_gtest/locale_localeconv_test.cpp", "locale/locale_gtest/locale_newlocale_test.cpp", "locale/locale_gtest/locale_nl_langinfo_l_test.cpp", "locale/locale_gtest/locale_strtof_l_test.cpp", "locale/locale_gtest/locale_uselocale_test.cpp", "malloc/malloc_gtest/malloc_calloc_test.cpp", "malloc/malloc_gtest/malloc_free_test.cpp", "malloc/malloc_gtest/malloc_malloc_test.cpp", "malloc/malloc_gtest/malloc_malloc_usable_size_test.cpp", # math unittest "math/math_gtest/complex_test.cpp", "math/math_gtest/math_acos_test.cpp", "math/math_gtest/math_acosh_test.cpp", "math/math_gtest/math_asin_test.cpp", "math/math_gtest/math_asinh_test.cpp", "math/math_gtest/math_atan2_test.cpp", "math/math_gtest/math_atan_test.cpp", "math/math_gtest/math_atanh_test.cpp", "math/math_gtest/math_cbrt_test.cpp", "math/math_gtest/math_ceil_test.cpp", "math/math_gtest/math_copysign_test.cpp", "math/math_gtest/math_cos_test.cpp", "math/math_gtest/math_cosh_test.cpp", "math/math_gtest/math_data_test.cpp", "math/math_gtest/math_drem_test.cpp", "math/math_gtest/math_erf_test.cpp", "math/math_gtest/math_erfc_test.cpp", "math/math_gtest/math_exp2_test.cpp", "math/math_gtest/math_exp_test.cpp", "math/math_gtest/math_expm1_test.cpp", "math/math_gtest/math_fabs_test.cpp", "math/math_gtest/math_fdim_test.cpp", "math/math_gtest/math_finite_test.cpp", "math/math_gtest/math_floor_test.cpp", "math/math_gtest/math_fma_test.cpp", "math/math_gtest/math_fmax_test.cpp", "math/math_gtest/math_fmin_test.cpp", "math/math_gtest/math_fmod_test.cpp", "math/math_gtest/math_frexp_test.cpp", "math/math_gtest/math_hypot_test.cpp", "math/math_gtest/math_ilogb_test.cpp", "math/math_gtest/math_j0_test.cpp", "math/math_gtest/math_j1_test.cpp", "math/math_gtest/math_jn_test.cpp", "math/math_gtest/math_ldexp_test.cpp", "math/math_gtest/math_lgamma_r_test.cpp", "math/math_gtest/math_lgamma_test.cpp", "math/math_gtest/math_llrint_test.cpp", "math/math_gtest/math_log10_test.cpp", "math/math_gtest/math_log1p_test.cpp", "math/math_gtest/math_log2_test.cpp", "math/math_gtest/math_log_test.cpp", "math/math_gtest/math_logb_test.cpp", "math/math_gtest/math_lrint_test.cpp", "math/math_gtest/math_modf_test.cpp", "math/math_gtest/math_nearbyint_test.cpp", "math/math_gtest/math_nextafter_test.cpp", "math/math_gtest/math_nexttoward_test.cpp", "math/math_gtest/math_pow_test.cpp", "math/math_gtest/math_remainder_test.cpp", "math/math_gtest/math_remquo_test.cpp", "math/math_gtest/math_rint_test.cpp", "math/math_gtest/math_round_test.cpp", "math/math_gtest/math_scalb_test.cpp", "math/math_gtest/math_scalbn_test.cpp", "math/math_gtest/math_signbit_test.cpp", "math/math_gtest/math_significand_test.cpp", "math/math_gtest/math_sin_test.cpp", "math/math_gtest/math_sincos_test.cpp", "math/math_gtest/math_sinh_test.cpp", "math/math_gtest/math_sqrt_test.cpp", "math/math_gtest/math_tan_test.cpp", "math/math_gtest/math_tanh_test.cpp", "math/math_gtest/math_tgamma_test.cpp", "math/math_gtest/math_trunc_test.cpp", "math/math_gtest/math_y0_test.cpp", "math/math_gtest/math_y1_test.cpp", "math/math_gtest/math_yn_test.cpp", "misc/misc_gtest/misc_basename_test.cpp", "misc/misc_gtest/misc_closelog_test.cpp", "misc/misc_gtest/misc_dirname_test.cpp", "misc/misc_gtest/misc_getentropy_test.cpp", "misc/misc_gtest/misc_getpriority_test.cpp", "misc/misc_gtest/misc_getrlimit64_test.cpp", "misc/misc_gtest/misc_ioctl_test.cpp", "misc/misc_gtest/misc_nftw64_test.cpp", "misc/misc_gtest/misc_realpath_test.cpp", "misc/misc_gtest/misc_setpriority_test.cpp", "misc/misc_gtest/misc_syscall_test.cpp", "misc/misc_gtest/misc_uname_test.cpp", "mman/mman_gtest/mman_madvise_test.cpp", "mman/mman_gtest/mman_mmap_test.cpp", "mman/mman_gtest/mman_mprotect_test.cpp", "mman/mman_gtest/mman_msync_test.cpp", "multibyte/multibyte_gtest/multibyte_mbrtowc_test.cpp", "network/network_gtest/arpa_inet_test.cpp", "network/network_gtest/endian_test.cpp", "network/network_gtest/fortify_test.cpp", "network/network_gtest/net_if_test.cpp", "network/network_gtest/netdb_test.cpp", "network/network_gtest/netinet_ether_test.cpp", "network/network_gtest/network_herror_test.cpp", "network/network_gtest/network_res_search_test.cpp", "network/network_gtest/resolv_test.cpp", "network/network_gtest/socket_test.cpp", "passwd/passwd_gtest/passwd_endgrent_test.cpp", "prng/prng_gtest/prng_rand_r_test.cpp", "prng/prng_gtest/prng_rand_test.cpp", "process/process_gtest/process_unsetenv_test.cpp", "regex/regex_gtest/regex_fnmatch_test.cpp", "search/search_gtest/search_tdelete_test.cpp", "search/search_gtest/search_tfind_test.cpp", "select/select_gtest/select_poll_test.cpp", "setjmp/setjmp_gtest/setjmp_setjmp_test.cpp", "sigchain/sigchain_gtest/sigchain_add_special_signal_handler_test.cpp", "signal/signal_gtest/signal_sigaddset_test.cpp", "signal/signal_gtest/signal_sigemptyset_test.cpp", "signal/signal_gtest/signal_sigtimedwait_test.cpp", "signal/signal_gtest/signal_sysv_signal_test.cpp", "stat/stat_gtest/stat_chmod_test.cpp", "stat/stat_gtest/stat_fstat64_test.cpp", "stat/stat_gtest/stat_fstat_test.cpp", "stat/stat_gtest/stat_fstatat64_test.cpp", "stat/stat_gtest/stat_fstatat_test.cpp", "stat/stat_gtest/stat_fstatfs64_test.cpp", "stat/stat_gtest/stat_lstat_test.cpp", "stat/stat_gtest/stat_mkdir_test.cpp", "stat/stat_gtest/stat_stat_test.cpp", "stat/stat_gtest/stat_statvfs64_test.cpp", "stat/stat_gtest/stat_umask_test.cpp", "stdio/stdio_gtest/stdio_clearerr_unlocked_test.cpp", "stdio/stdio_gtest/stdio_feof_unlocked_test.cpp", "stdio/stdio_gtest/stdio_ferror_test.cpp", "stdio/stdio_gtest/stdio_ferror_unlocked_test.cpp", "stdio/stdio_gtest/stdio_fflush_unlocked_test.cpp", "stdio/stdio_gtest/stdio_fgetpos64_test.cpp", "stdio/stdio_gtest/stdio_fileno_unlocked_test.cpp", "stdio/stdio_gtest/stdio_fpurge_test.cpp", "stdio/stdio_gtest/stdio_fputc_unlocked_test.cpp", "stdio/stdio_gtest/stdio_fsetlocking_test.cpp", "stdio/stdio_gtest/stdio_gets_test.cpp", "stdio/stdio_gtest/stdio_getwchar_test.cpp", "stdio/stdio_gtest/stdio_perror_test.cpp", "stdlib/stdlib_gtest/stdlib_arc4random_test.cpp", "stdlib/stdlib_gtest/stdlib_div_test.cpp", "string/string_gtest/string_bcmp_test.cpp", "string/string_gtest/string_bcopy_test.cpp", "string/string_gtest/string_memchr_test.cpp", "string/string_gtest/string_memcmp_test.cpp", "string/string_gtest/string_memcpy_test.cpp", "string/string_gtest/string_memrchr_test.cpp", "string/string_gtest/string_memset_test.cpp", "string/string_gtest/string_strcasecmp_test.cpp", "string/string_gtest/string_strcat_test.cpp", "string/string_gtest/string_strchr_test.cpp", "string/string_gtest/string_strcmp_test.cpp", "string/string_gtest/string_strcpy_test.cpp", "string/string_gtest/string_strcspn_test.cpp", "string/string_gtest/string_strdup_test.cpp", "string/string_gtest/string_strlen_test.cpp", "string/string_gtest/string_strncasecmp_test.cpp", "string/string_gtest/string_strncmp_test.cpp", "string/string_gtest/string_strncpy_test.cpp", "string/string_gtest/string_strnlen_test.cpp", "string/string_gtest/string_strpbrk_test.cpp", "string/string_gtest/string_strrchr_test.cpp", "string/string_gtest/string_strspn_test.cpp", "string/string_gtest/string_strstr_test.cpp", "string/string_gtest/string_wmemchr_test.cpp", "string/string_gtest/string_wmemcmp_test.cpp", "temp/temp_gtest/temp_mkostemp64_test.cpp", "temp/temp_gtest/temp_mkstemp64_test.cpp", "temp/temp_gtest/temp_mkstemps64_test.cpp", "thread/thread_gtest/pthread_attr_test.cpp", "thread/thread_gtest/pthread_barrier_test.cpp", "thread/thread_gtest/pthread_cleanup_test.cpp", "thread/thread_gtest/pthread_cond_test.cpp", "thread/thread_gtest/pthread_key_test.cpp", "thread/thread_gtest/pthread_spin_test.cpp", "thread/thread_gtest/thread_callonce_test.cpp", "thread/thread_gtest/thread_cnd_test.cpp", "thread/thread_gtest/thread_mutex_test.cpp", "thread/thread_gtest/thread_mutexattr_test.cpp", "thread/thread_gtest/thread_pthrd_test.cpp", "thread/thread_gtest/thread_rwlock_test.cpp", "thread/thread_gtest/thread_sem_test.cpp", "thread/thread_gtest/thread_thrd_test.cpp", "thread/thread_gtest/thread_tls_get_addr_test.cpp", "thread/thread_gtest/thread_tss_test.cpp", "time/time_gtest/sys_clock_test.cpp", "time/time_gtest/time_daylight_test.cpp", "time/time_gtest/time_ftime_test.cpp", "time/time_gtest/time_test.cpp", "time/time_gtest/time_timezone_test.cpp", "time/time_gtest/time_tzname_test.cpp", "time/time_gtest/time_tzset_test.cpp", "time/time_gtest/timer_test.cpp", "unistd/unistd_gtest/unistd_Exit_test.cpp", "unistd/unistd_gtest/unistd_access_test.cpp", "unistd/unistd_gtest/unistd_dup2_test.cpp", "unistd/unistd_gtest/unistd_dup_test.cpp", "unistd/unistd_gtest/unistd_fdatasync_test.cpp", "unistd/unistd_gtest/unistd_fsync_test.cpp", "unistd/unistd_gtest/unistd_ftruncate64_test.cpp", "unistd/unistd_gtest/unistd_getid_test.cpp", "unistd/unistd_gtest/unistd_pipe2_test.cpp", "unistd/unistd_gtest/unistd_pipe_test.cpp", "unistd/unistd_gtest/unistd_pread64_test.cpp", "unistd/unistd_gtest/unistd_pwrite64_test.cpp", "unistd/unistd_gtest/unistd_read_test.cpp", "unistd/unistd_gtest/unistd_readlink_test.cpp", "unistd/unistd_gtest/unistd_rmdir_test.cpp", "unistd/unistd_gtest/unistd_unlink_test.cpp", "unistd/unistd_gtest/unistd_usleep_test.cpp", "unistd/unistd_gtest/unistd_write_test.cpp", "unistd/unistd_gtest/unistd_writev_test.cpp", ] ldflags = [ "-Wl,-rpath=/data/tmp/libcgtest/libs:/data/tmp/libcgtest/libs/rpath-test/", ] include_dirs = [ "//third_party/musl" ] configs = [ ":module_private_config" ] if (musl_use_pthread_cancel) { cflags += [ "-DFEATURE_PTHREAD_CANCEL" ] } external_deps = [ "googletest:gtest_main" ] }