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("//build/test.gni") 15import("../../../../test_template.gni") 16import("test_src_functionalext_supplement_thread.gni") 17 18default_include_dirs = 19 [ "//third_party/musl/libc-test/src/functionalext/common" ] 20 21default_configs = [ "//third_party/musl/libc-test/src/common:config_runtest" ] 22 23ohos_executable("pthread_attr_getstack_test") { 24 subsystem_name = "musl" 25 part_name = "libc-test" 26 include_dirs = default_include_dirs 27 configs = default_configs 28 sources = [ "pthread_attr_getstack.c" ] 29} 30 31ohos_executable("pthread_attr_setdetachstate_test") { 32 subsystem_name = "musl" 33 part_name = "libc-test" 34 include_dirs = default_include_dirs 35 configs = default_configs 36 sources = [ "pthread_attr_setdetachstate.c" ] 37} 38 39ohos_executable("pthread_attr_setstacksize_test") { 40 subsystem_name = "musl" 41 part_name = "libc-test" 42 include_dirs = default_include_dirs 43 configs = default_configs 44 sources = [ "pthread_attr_setstacksize.c" ] 45} 46 47ohos_executable("pthread_condattr_destroy_test") { 48 subsystem_name = "musl" 49 part_name = "libc-test" 50 include_dirs = default_include_dirs 51 configs = default_configs 52 sources = [ "pthread_condattr_destroy.c" ] 53} 54 55ohos_executable("pthread_condattr_init_test") { 56 subsystem_name = "musl" 57 part_name = "libc-test" 58 include_dirs = default_include_dirs 59 configs = default_configs 60 sources = [ "pthread_condattr_init.c" ] 61} 62 63ohos_executable("pthread_create_test") { 64 subsystem_name = "musl" 65 part_name = "libc-test" 66 include_dirs = default_include_dirs 67 configs = default_configs 68 sources = [ "pthread_create.c" ] 69} 70 71ohos_executable("pthread_exit_test") { 72 subsystem_name = "musl" 73 part_name = "libc-test" 74 include_dirs = default_include_dirs 75 configs = default_configs 76 sources = [ "pthread_exit.c" ] 77} 78 79ohos_executable("pthread_getattr_np_test") { 80 subsystem_name = "musl" 81 part_name = "libc-test" 82 include_dirs = default_include_dirs 83 configs = default_configs 84 sources = [ "pthread_getattr_np.c" ] 85} 86 87ohos_executable("pthread_getschedparam_test") { 88 subsystem_name = "musl" 89 part_name = "libc-test" 90 include_dirs = default_include_dirs 91 configs = default_configs 92 sources = [ "pthread_getschedparam.c" ] 93} 94 95ohos_executable("pthread_getspecific_test") { 96 subsystem_name = "musl" 97 part_name = "libc-test" 98 include_dirs = default_include_dirs 99 configs = default_configs 100 sources = [ "pthread_getspecific.c" ] 101} 102 103ohos_executable("pthread_key_create_test") { 104 subsystem_name = "musl" 105 part_name = "libc-test" 106 include_dirs = default_include_dirs 107 configs = default_configs 108 sources = [ "pthread_key_create.c" ] 109} 110 111ohos_executable("pthread_mutex_init_test") { 112 subsystem_name = "musl" 113 part_name = "libc-test" 114 include_dirs = default_include_dirs 115 configs = default_configs 116 sources = [ "pthread_mutex_init.c" ] 117} 118 119ohos_executable("pthread_mutex_lock_test") { 120 subsystem_name = "musl" 121 part_name = "libc-test" 122 include_dirs = default_include_dirs 123 configs = default_configs 124 sources = [ "pthread_mutex_lock.c" ] 125} 126 127ohos_executable("pthread_mutex_unlock_test") { 128 subsystem_name = "musl" 129 part_name = "libc-test" 130 include_dirs = default_include_dirs 131 configs = default_configs 132 sources = [ "pthread_mutex_unlock.c" ] 133} 134 135ohos_executable("pthread_once_test") { 136 subsystem_name = "musl" 137 part_name = "libc-test" 138 include_dirs = default_include_dirs 139 configs = default_configs 140 sources = [ "pthread_once.c" ] 141} 142 143ohos_executable("pthread_rwlock_destroy_test") { 144 subsystem_name = "musl" 145 part_name = "libc-test" 146 include_dirs = default_include_dirs 147 configs = default_configs 148 sources = [ "pthread_rwlock_destroy.c" ] 149} 150 151ohos_executable("pthread_setschedparam_test") { 152 subsystem_name = "musl" 153 part_name = "libc-test" 154 include_dirs = default_include_dirs 155 configs = default_configs 156 sources = [ "pthread_setschedparam.c" ] 157} 158 159ohos_executable("pthread_setspecific_test") { 160 subsystem_name = "musl" 161 part_name = "libc-test" 162 include_dirs = default_include_dirs 163 configs = default_configs 164 sources = [ "pthread_setspecific.c" ] 165} 166 167ohos_executable("pthread_sigmask_test") { 168 subsystem_name = "musl" 169 part_name = "libc-test" 170 include_dirs = default_include_dirs 171 configs = default_configs 172 sources = [ "pthread_sigmask.c" ] 173} 174 175foreach(s, functionalext_supplement_thread_test) { 176 test_unittest(s) { 177 target_dir = "functionalext/supplement/thread" 178 } 179} 180 181group("functionalext_supplement_thread_test") { 182 testonly = true 183 deps = [ 184 ":pthread_attr_getstack_test", 185 ":pthread_attr_setdetachstate_test", 186 ":pthread_attr_setstacksize_test", 187 ":pthread_condattr_destroy_test", 188 ":pthread_condattr_init_test", 189 ":pthread_create_test", 190 ":pthread_exit_test", 191 ":pthread_getattr_np_test", 192 ":pthread_getschedparam_test", 193 ":pthread_getspecific_test", 194 ":pthread_key_create_test", 195 ":pthread_mutex_init_test", 196 ":pthread_mutex_lock_test", 197 ":pthread_mutex_unlock_test", 198 ":pthread_once_test", 199 ":pthread_rwlock_destroy_test", 200 ":pthread_setschedparam_test", 201 ":pthread_setspecific_test", 202 ":pthread_sigmask_test", 203 ] 204 foreach(s, functionalext_supplement_thread_test) { 205 deps += [ ":${s}" ] 206 } 207} 208