xref: /llvm-project/libc/test/integration/src/pthread/CMakeLists.txt (revision 46944b0cbc9a9d8daad0182c40fcd3560bc9ca35)
1add_libc_integration_test_suite(libc-pthread-integration-tests)
2
3add_integration_test(
4  pthread_mutex_test
5  SUITE
6    libc-pthread-integration-tests
7  SRCS
8    pthread_mutex_test.cpp
9  DEPENDS
10    libc.include.pthread
11    libc.src.errno.errno
12    libc.src.pthread.pthread_mutex_destroy
13    libc.src.pthread.pthread_mutex_init
14    libc.src.pthread.pthread_mutex_lock
15    libc.src.pthread.pthread_mutex_unlock
16    libc.src.pthread.pthread_create
17    libc.src.pthread.pthread_join
18)
19
20add_integration_test(
21  pthread_rwlock_test
22  SUITE
23    libc-pthread-integration-tests
24  SRCS
25    pthread_rwlock_test.cpp
26  DEPENDS
27    libc.hdr.time_macros
28    libc.hdr.errno_macros
29    libc.include.pthread
30    libc.src.pthread.pthread_rwlock_destroy
31    libc.src.pthread.pthread_rwlock_init
32    libc.src.pthread.pthread_rwlock_rdlock
33    libc.src.pthread.pthread_rwlock_tryrdlock
34    libc.src.pthread.pthread_rwlock_timedrdlock
35    libc.src.pthread.pthread_rwlock_clockrdlock
36    libc.src.pthread.pthread_rwlock_wrlock
37    libc.src.pthread.pthread_rwlock_trywrlock
38    libc.src.pthread.pthread_rwlock_timedwrlock
39    libc.src.pthread.pthread_rwlock_clockwrlock
40    libc.src.pthread.pthread_rwlock_unlock
41    libc.src.pthread.pthread_create
42    libc.src.pthread.pthread_join
43    libc.src.pthread.pthread_rwlockattr_init
44    libc.src.pthread.pthread_rwlockattr_destroy
45    libc.src.pthread.pthread_rwlockattr_setpshared
46    libc.src.pthread.pthread_rwlockattr_setkind_np
47    libc.src.__support.threads.linux.raw_mutex
48    libc.src.stdio.printf
49    libc.src.stdlib.getenv
50    libc.src.sys.mman.mmap
51    libc.src.sys.mman.munmap
52    libc.src.time.clock_gettime
53    libc.src.sys.random.getrandom
54    libc.src.unistd.fork
55    libc.src.sys.wait.waitpid
56    libc.src.stdlib.exit
57    libc.src.__support.CPP.atomic
58    libc.src.__support.CPP.new
59    libc.src.__support.threads.sleep
60)
61
62add_integration_test(
63  pthread_spinlock_test
64  SUITE
65    libc-pthread-integration-tests
66  SRCS
67    pthread_spinlock_test.cpp
68  DEPENDS
69    libc.hdr.errno_macros
70    libc.include.pthread
71    libc.src.pthread.pthread_spin_init
72    libc.src.pthread.pthread_spin_destroy
73    libc.src.pthread.pthread_spin_lock
74    libc.src.pthread.pthread_spin_trylock
75    libc.src.pthread.pthread_spin_unlock
76    libc.src.pthread.pthread_create
77    libc.src.pthread.pthread_join
78)
79
80add_integration_test(
81  pthread_test
82  SUITE
83    libc-pthread-integration-tests
84  SRCS
85    pthread_test.cpp
86  DEPENDS
87    libc.include.pthread
88    libc.src.pthread.pthread_create
89    libc.src.pthread.pthread_join
90)
91
92add_integration_test(
93  pthread_equal_test
94  SUITE
95    libc-pthread-integration-tests
96  SRCS
97    pthread_equal_test.cpp
98  DEPENDS
99    libc.include.pthread
100    libc.src.errno.errno
101    libc.src.pthread.pthread_mutex_destroy
102    libc.src.pthread.pthread_mutex_init
103    libc.src.pthread.pthread_mutex_lock
104    libc.src.pthread.pthread_mutex_unlock
105    libc.src.pthread.pthread_create
106    libc.src.pthread.pthread_equal
107    libc.src.pthread.pthread_join
108    libc.src.pthread.pthread_self
109)
110
111add_integration_test(
112  pthread_name_test
113  SUITE
114    libc-pthread-integration-tests
115  SRCS
116    pthread_name_test.cpp
117  DEPENDS
118    libc.include.pthread
119    libc.src.errno.errno
120    libc.src.pthread.pthread_create
121    libc.src.pthread.pthread_getname_np
122    libc.src.pthread.pthread_join
123    libc.src.pthread.pthread_mutex_destroy
124    libc.src.pthread.pthread_mutex_init
125    libc.src.pthread.pthread_mutex_lock
126    libc.src.pthread.pthread_mutex_unlock
127    libc.src.pthread.pthread_self
128    libc.src.pthread.pthread_setname_np
129)
130
131add_integration_test(
132  pthread_exit_test
133  SUITE
134    libc-pthread-integration-tests
135  SRCS
136    pthread_exit_test.cpp
137  DEPENDS
138    libc.include.pthread
139    libc.src.pthread.pthread_create
140    libc.src.pthread.pthread_exit
141    libc.src.pthread.pthread_join
142)
143
144add_integration_test(
145  pthread_tss_test
146  SUITE
147    libc-pthread-integration-tests
148  SRCS
149    pthread_tss_test.cpp
150  DEPENDS
151    libc.include.pthread
152    libc.src.pthread.pthread_create
153    libc.src.pthread.pthread_exit
154    libc.src.pthread.pthread_join
155    libc.src.pthread.pthread_key_create
156    libc.src.pthread.pthread_key_delete
157    libc.src.pthread.pthread_getspecific
158    libc.src.pthread.pthread_setspecific
159)
160
161add_integration_test(
162  pthread_once_test
163  SUITE
164    libc-pthread-integration-tests
165  SRCS
166    pthread_once_test.cpp
167  DEPENDS
168    libc.include.pthread
169    libc.src.pthread.pthread_once
170    libc.src.pthread.pthread_mutex_destroy
171    libc.src.pthread.pthread_mutex_init
172    libc.src.pthread.pthread_mutex_lock
173    libc.src.pthread.pthread_mutex_unlock
174    libc.src.pthread.pthread_create
175    libc.src.pthread.pthread_join
176    libc.src.__support.CPP.atomic
177)
178
179add_integration_test(
180  pthread_join_test
181  SUITE
182    libc-pthread-integration-tests
183  SRCS
184    pthread_join_test.cpp
185  DEPENDS
186    libc.include.pthread
187    libc.include.stdio
188    libc.src.errno.errno
189    libc.src.pthread.pthread_create
190    libc.src.pthread.pthread_join
191)
192
193add_integration_test(
194  pthread_create_test
195  SUITE
196    libc-pthread-integration-tests
197  SRCS
198    pthread_create_test.cpp
199  DEPENDS
200    libc.include.pthread
201    libc.src.errno.errno
202    libc.src.pthread.pthread_create
203    libc.src.pthread.pthread_join
204    libc.src.pthread.pthread_attr_getdetachstate
205    libc.src.pthread.pthread_attr_getguardsize
206    libc.src.pthread.pthread_attr_getstack
207    libc.src.pthread.pthread_attr_getstacksize
208    libc.src.pthread.pthread_attr_setdetachstate
209    libc.src.pthread.pthread_attr_setguardsize
210    libc.src.pthread.pthread_attr_setstack
211    libc.src.pthread.pthread_attr_setstacksize
212    libc.src.pthread.pthread_attr_init
213    libc.src.pthread.pthread_attr_destroy
214    libc.src.pthread.pthread_self
215    libc.src.sys.mman.mmap
216    libc.src.sys.mman.munmap
217    libc.src.sys.random.getrandom
218    libc.src.__support.threads.thread
219    libc.src.__support.CPP.atomic
220    libc.src.__support.CPP.array
221    libc.src.__support.CPP.new
222)
223