aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2018-03-25 19:21:16 -0500
committerBrent Cook <bcook@openbsd.org>2018-03-25 19:21:16 -0500
commit55c0cacca0fe675a15389dc175088528a5d2cd00 (patch)
treed7fe59187a56f99a6f1781f6028280e2747a2797 /tests
parent89e5bc52275019dccc608b6a3998fda5c2e1e604 (diff)
parent4d753badc09cca1a85c4fb7f404bae2d6ed51f5f (diff)
downloadportable-55c0cacca0fe675a15389dc175088528a5d2cd00.tar.gz
portable-55c0cacca0fe675a15389dc175088528a5d2cd00.tar.bz2
portable-55c0cacca0fe675a15389dc175088528a5d2cd00.zip
Land #406, use BUILD_SHARED_LIBS
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt155
1 files changed, 66 insertions, 89 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4942e0a..69c0d51 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -12,155 +12,143 @@ include_directories(
12 12
13add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../apps/openssl/cert.pem\") 13add_definitions(-D_PATH_SSL_CA_FILE=\"${CMAKE_CURRENT_SOURCE_DIR}/../apps/openssl/cert.pem\")
14 14
15foreach(lib IN LISTS OPENSSL_LIBS)
16 if(${lib} STREQUAL "tls-shared")
17 set(TESTS_LIBS ${TESTS_LIBS} tls)
18 elseif(${lib} STREQUAL "ssl-shared")
19 set(TESTS_LIBS ${TESTS_LIBS} ssl)
20 elseif(${lib} STREQUAL "crypto-shared")
21 set(TESTS_LIBS ${TESTS_LIBS} crypto)
22 else()
23 set(TESTS_LIBS ${TESTS_LIBS} ${lib})
24 endif()
25endforeach()
26
27file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR) 15file(TO_NATIVE_PATH ${CMAKE_CURRENT_SOURCE_DIR} TEST_SOURCE_DIR)
28 16
29# aeadtest 17# aeadtest
30add_executable(aeadtest aeadtest.c) 18add_executable(aeadtest aeadtest.c)
31target_link_libraries(aeadtest ${TESTS_LIBS}) 19target_link_libraries(aeadtest ${OPENSSL_LIBS})
32add_test(aeadtest aeadtest ${CMAKE_CURRENT_SOURCE_DIR}/aeadtests.txt) 20add_test(aeadtest aeadtest ${CMAKE_CURRENT_SOURCE_DIR}/aeadtests.txt)
33 21
34# aes_wrap 22# aes_wrap
35add_executable(aes_wrap aes_wrap.c) 23add_executable(aes_wrap aes_wrap.c)
36target_link_libraries(aes_wrap ${TESTS_LIBS}) 24target_link_libraries(aes_wrap ${OPENSSL_LIBS})
37add_test(aes_wrap aes_wrap) 25add_test(aes_wrap aes_wrap)
38 26
39# arc4randomforktest 27# arc4randomforktest
40# Windows/mingw does not have fork, but Cygwin does. 28# Windows/mingw does not have fork, but Cygwin does.
41if(NOT CMAKE_HOST_WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES "MINGW") 29if(NOT CMAKE_HOST_WIN32 AND NOT CMAKE_SYSTEM_NAME MATCHES "MINGW")
42 add_executable(arc4randomforktest arc4randomforktest.c) 30 add_executable(arc4randomforktest arc4randomforktest.c)
43 target_link_libraries(arc4randomforktest ${TESTS_LIBS}) 31 target_link_libraries(arc4randomforktest ${OPENSSL_LIBS})
44 add_test(arc4randomforktest ${CMAKE_CURRENT_SOURCE_DIR}/arc4randomforktest.sh) 32 add_test(arc4randomforktest ${CMAKE_CURRENT_SOURCE_DIR}/arc4randomforktest.sh)
45endif() 33endif()
46 34
47# asn1evp 35# asn1evp
48add_executable(asn1evp asn1evp.c) 36add_executable(asn1evp asn1evp.c)
49target_link_libraries(asn1evp ${TESTS_LIBS}) 37target_link_libraries(asn1evp ${OPENSSL_LIBS})
50add_test(asn1evp asn1evp) 38add_test(asn1evp asn1evp)
51 39
52# asn1test 40# asn1test
53add_executable(asn1test asn1test.c) 41add_executable(asn1test asn1test.c)
54target_link_libraries(asn1test ${TESTS_LIBS}) 42target_link_libraries(asn1test ${OPENSSL_LIBS})
55add_test(asn1test asn1test) 43add_test(asn1test asn1test)
56 44
57# asn1time 45# asn1time
58add_executable(asn1time asn1time.c) 46add_executable(asn1time asn1time.c)
59target_link_libraries(asn1time ${TESTS_LIBS}) 47target_link_libraries(asn1time ${OPENSSL_LIBS})
60add_test(asn1time asn1time) 48add_test(asn1time asn1time)
61 49
62# base64test 50# base64test
63add_executable(base64test base64test.c) 51add_executable(base64test base64test.c)
64target_link_libraries(base64test ${TESTS_LIBS}) 52target_link_libraries(base64test ${OPENSSL_LIBS})
65add_test(base64test base64test) 53add_test(base64test base64test)
66 54
67# bftest 55# bftest
68add_executable(bftest bftest.c) 56add_executable(bftest bftest.c)
69target_link_libraries(bftest ${TESTS_LIBS}) 57target_link_libraries(bftest ${OPENSSL_LIBS})
70add_test(bftest bftest) 58add_test(bftest bftest)
71 59
72# biotest 60# biotest
73# the BIO tests rely on resolver results that are OS and environment-specific 61# the BIO tests rely on resolver results that are OS and environment-specific
74if(ENABLE_EXTRATESTS) 62if(ENABLE_EXTRATESTS)
75 add_executable(biotest biotest.c) 63 add_executable(biotest biotest.c)
76 target_link_libraries(biotest ${TESTS_LIBS}) 64 target_link_libraries(biotest ${OPENSSL_LIBS})
77 add_test(biotest biotest) 65 add_test(biotest biotest)
78endif() 66endif()
79 67
80# bntest 68# bntest
81add_executable(bntest bntest.c) 69add_executable(bntest bntest.c)
82set_source_files_properties(bntest.c PROPERTIES COMPILE_FLAGS -ULIBRESSL_INTERNAL) 70set_source_files_properties(bntest.c PROPERTIES COMPILE_FLAGS -ULIBRESSL_INTERNAL)
83target_link_libraries(bntest ${TESTS_LIBS}) 71target_link_libraries(bntest ${OPENSSL_LIBS})
84add_test(bntest bntest) 72add_test(bntest bntest)
85 73
86# bytestringtest 74# bytestringtest
87add_executable(bytestringtest bytestringtest.c) 75add_executable(bytestringtest bytestringtest.c)
88target_link_libraries(bytestringtest ${TESTS_LIBS}) 76target_link_libraries(bytestringtest ${OPENSSL_LIBS})
89add_test(bytestringtest bytestringtest) 77add_test(bytestringtest bytestringtest)
90 78
91# casttest 79# casttest
92add_executable(casttest casttest.c) 80add_executable(casttest casttest.c)
93target_link_libraries(casttest ${TESTS_LIBS}) 81target_link_libraries(casttest ${OPENSSL_LIBS})
94add_test(casttest casttest) 82add_test(casttest casttest)
95 83
96# chachatest 84# chachatest
97add_executable(chachatest chachatest.c) 85add_executable(chachatest chachatest.c)
98target_link_libraries(chachatest ${TESTS_LIBS}) 86target_link_libraries(chachatest ${OPENSSL_LIBS})
99add_test(chachatest chachatest) 87add_test(chachatest chachatest)
100 88
101# cipher_list 89# cipher_list
102add_executable(cipher_list cipher_list.c) 90add_executable(cipher_list cipher_list.c)
103target_link_libraries(cipher_list ${TESTS_LIBS}) 91target_link_libraries(cipher_list ${OPENSSL_LIBS})
104add_test(cipher_list cipher_list) 92add_test(cipher_list cipher_list)
105 93
106# cipherstest 94# cipherstest
107add_executable(cipherstest cipherstest.c) 95add_executable(cipherstest cipherstest.c)
108target_link_libraries(cipherstest ${TESTS_LIBS}) 96target_link_libraries(cipherstest ${OPENSSL_LIBS})
109add_test(cipherstest cipherstest) 97add_test(cipherstest cipherstest)
110 98
111# clienttest 99# clienttest
112add_executable(clienttest clienttest.c) 100add_executable(clienttest clienttest.c)
113target_link_libraries(clienttest ${TESTS_LIBS}) 101target_link_libraries(clienttest ${OPENSSL_LIBS})
114add_test(clienttest clienttest) 102add_test(clienttest clienttest)
115 103
116# configtest 104# configtest
117add_executable(configtest configtest.c) 105add_executable(configtest configtest.c)
118target_link_libraries(configtest ${TESTS_LIBS}) 106target_link_libraries(configtest ${OPENSSL_LIBS})
119add_test(configtest configtest) 107add_test(configtest configtest)
120 108
121# cts128test 109# cts128test
122add_executable(cts128test cts128test.c) 110add_executable(cts128test cts128test.c)
123target_link_libraries(cts128test ${TESTS_LIBS}) 111target_link_libraries(cts128test ${OPENSSL_LIBS})
124add_test(cts128test cts128test) 112add_test(cts128test cts128test)
125 113
126# destest 114# destest
127add_executable(destest destest.c) 115add_executable(destest destest.c)
128target_link_libraries(destest ${TESTS_LIBS}) 116target_link_libraries(destest ${OPENSSL_LIBS})
129add_test(destest destest) 117add_test(destest destest)
130 118
131# dhtest 119# dhtest
132add_executable(dhtest dhtest.c) 120add_executable(dhtest dhtest.c)
133target_link_libraries(dhtest ${TESTS_LIBS}) 121target_link_libraries(dhtest ${OPENSSL_LIBS})
134add_test(dhtest dhtest) 122add_test(dhtest dhtest)
135 123
136# dsatest 124# dsatest
137add_executable(dsatest dsatest.c) 125add_executable(dsatest dsatest.c)
138target_link_libraries(dsatest ${TESTS_LIBS}) 126target_link_libraries(dsatest ${OPENSSL_LIBS})
139add_test(dsatest dsatest) 127add_test(dsatest dsatest)
140 128
141# ecdhtest 129# ecdhtest
142add_executable(ecdhtest ecdhtest.c) 130add_executable(ecdhtest ecdhtest.c)
143target_link_libraries(ecdhtest ${TESTS_LIBS}) 131target_link_libraries(ecdhtest ${OPENSSL_LIBS})
144add_test(ecdhtest ecdhtest) 132add_test(ecdhtest ecdhtest)
145 133
146# ecdsatest 134# ecdsatest
147add_executable(ecdsatest ecdsatest.c) 135add_executable(ecdsatest ecdsatest.c)
148target_link_libraries(ecdsatest ${TESTS_LIBS}) 136target_link_libraries(ecdsatest ${OPENSSL_LIBS})
149add_test(ecdsatest ecdsatest) 137add_test(ecdsatest ecdsatest)
150 138
151# ectest 139# ectest
152add_executable(ectest ectest.c) 140add_executable(ectest ectest.c)
153target_link_libraries(ectest ${TESTS_LIBS}) 141target_link_libraries(ectest ${OPENSSL_LIBS})
154add_test(ectest ectest) 142add_test(ectest ectest)
155 143
156# enginetest 144# enginetest
157add_executable(enginetest enginetest.c) 145add_executable(enginetest enginetest.c)
158target_link_libraries(enginetest ${TESTS_LIBS}) 146target_link_libraries(enginetest ${OPENSSL_LIBS})
159add_test(enginetest enginetest) 147add_test(enginetest enginetest)
160 148
161# evptest 149# evptest
162add_executable(evptest evptest.c) 150add_executable(evptest evptest.c)
163target_link_libraries(evptest ${TESTS_LIBS}) 151target_link_libraries(evptest ${OPENSSL_LIBS})
164add_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt) 152add_test(evptest evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptests.txt)
165 153
166# explicit_bzero 154# explicit_bzero
@@ -171,54 +159,54 @@ if(NOT WIN32)
171 else() 159 else()
172 add_executable(explicit_bzero explicit_bzero.c compat/memmem.c) 160 add_executable(explicit_bzero explicit_bzero.c compat/memmem.c)
173 endif() 161 endif()
174 target_link_libraries(explicit_bzero ${TESTS_LIBS}) 162 target_link_libraries(explicit_bzero ${OPENSSL_LIBS})
175 add_test(explicit_bzero explicit_bzero) 163 add_test(explicit_bzero explicit_bzero)
176endif() 164endif()
177 165
178# exptest 166# exptest
179add_executable(exptest exptest.c) 167add_executable(exptest exptest.c)
180set_source_files_properties(exptest.c PROPERTIES COMPILE_FLAGS -ULIBRESSL_INTERNAL) 168set_source_files_properties(exptest.c PROPERTIES COMPILE_FLAGS -ULIBRESSL_INTERNAL)
181target_link_libraries(exptest ${TESTS_LIBS}) 169target_link_libraries(exptest ${OPENSSL_LIBS})
182add_test(exptest exptest) 170add_test(exptest exptest)
183 171
184# freenull 172# freenull
185add_executable(freenull freenull.c) 173add_executable(freenull freenull.c)
186target_link_libraries(freenull ${TESTS_LIBS}) 174target_link_libraries(freenull ${OPENSSL_LIBS})
187add_test(freenull freenull) 175add_test(freenull freenull)
188 176
189# gcm128test 177# gcm128test
190add_executable(gcm128test gcm128test.c) 178add_executable(gcm128test gcm128test.c)
191target_link_libraries(gcm128test ${TESTS_LIBS}) 179target_link_libraries(gcm128test ${OPENSSL_LIBS})
192add_test(gcm128test gcm128test) 180add_test(gcm128test gcm128test)
193 181
194# gost2814789t 182# gost2814789t
195add_executable(gost2814789t gost2814789t.c) 183add_executable(gost2814789t gost2814789t.c)
196target_link_libraries(gost2814789t ${TESTS_LIBS}) 184target_link_libraries(gost2814789t ${OPENSSL_LIBS})
197add_test(gost2814789t gost2814789t) 185add_test(gost2814789t gost2814789t)
198 186
199# hkdf_test 187# hkdf_test
200add_executable(hkdf_test hkdf_test.c) 188add_executable(hkdf_test hkdf_test.c)
201target_link_libraries(hkdf_test ${TESTS_LIBS}) 189target_link_libraries(hkdf_test ${OPENSSL_LIBS})
202add_test(hkdf_test hkdf_test) 190add_test(hkdf_test hkdf_test)
203 191
204# hmactest 192# hmactest
205add_executable(hmactest hmactest.c) 193add_executable(hmactest hmactest.c)
206target_link_libraries(hmactest ${TESTS_LIBS}) 194target_link_libraries(hmactest ${OPENSSL_LIBS})
207add_test(hmactest hmactest) 195add_test(hmactest hmactest)
208 196
209# ideatest 197# ideatest
210add_executable(ideatest ideatest.c) 198add_executable(ideatest ideatest.c)
211target_link_libraries(ideatest ${TESTS_LIBS}) 199target_link_libraries(ideatest ${OPENSSL_LIBS})
212add_test(ideatest ideatest) 200add_test(ideatest ideatest)
213 201
214# igetest 202# igetest
215add_executable(igetest igetest.c) 203add_executable(igetest igetest.c)
216target_link_libraries(igetest ${TESTS_LIBS}) 204target_link_libraries(igetest ${OPENSSL_LIBS})
217add_test(igetest igetest) 205add_test(igetest igetest)
218 206
219# keypairtest 207# keypairtest
220add_executable(keypairtest keypairtest.c) 208add_executable(keypairtest keypairtest.c)
221target_link_libraries(keypairtest ${TESTS_LIBS}) 209target_link_libraries(keypairtest ${OPENSSL_LIBS})
222add_test(keypairtest keypairtest 210add_test(keypairtest keypairtest
223 ${CMAKE_CURRENT_SOURCE_DIR}/ca.pem 211 ${CMAKE_CURRENT_SOURCE_DIR}/ca.pem
224 ${CMAKE_CURRENT_SOURCE_DIR}/server.pem 212 ${CMAKE_CURRENT_SOURCE_DIR}/server.pem
@@ -226,23 +214,23 @@ add_test(keypairtest keypairtest
226 214
227# md4test 215# md4test
228add_executable(md4test md4test.c) 216add_executable(md4test md4test.c)
229target_link_libraries(md4test ${TESTS_LIBS}) 217target_link_libraries(md4test ${OPENSSL_LIBS})
230add_test(md4test md4test) 218add_test(md4test md4test)
231 219
232# md5test 220# md5test
233add_executable(md5test md5test.c) 221add_executable(md5test md5test.c)
234target_link_libraries(md5test ${TESTS_LIBS}) 222target_link_libraries(md5test ${OPENSSL_LIBS})
235add_test(md5test md5test) 223add_test(md5test md5test)
236 224
237# mont 225# mont
238add_executable(mont mont.c) 226add_executable(mont mont.c)
239target_link_libraries(mont ${TESTS_LIBS}) 227target_link_libraries(mont ${OPENSSL_LIBS})
240add_test(mont mont) 228add_test(mont mont)
241 229
242# ocsp_test 230# ocsp_test
243if(ENABLE_EXTRATESTS) 231if(ENABLE_EXTRATESTS)
244 add_executable(ocsp_test ocsp_test.c) 232 add_executable(ocsp_test ocsp_test.c)
245 target_link_libraries(ocsp_test ${TESTS_LIBS}) 233 target_link_libraries(ocsp_test ${OPENSSL_LIBS})
246 if(NOT MSVC) 234 if(NOT MSVC)
247 add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh) 235 add_test(NAME ocsptest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ocsptest.sh)
248 else() 236 else()
@@ -252,12 +240,12 @@ endif()
252 240
253# optionstest 241# optionstest
254add_executable(optionstest optionstest.c) 242add_executable(optionstest optionstest.c)
255target_link_libraries(optionstest ${TESTS_LIBS}) 243target_link_libraries(optionstest ${OPENSSL_LIBS})
256add_test(optionstest optionstest) 244add_test(optionstest optionstest)
257 245
258# pbkdf2 246# pbkdf2
259add_executable(pbkdf2 pbkdf2.c) 247add_executable(pbkdf2 pbkdf2.c)
260target_link_libraries(pbkdf2 ${TESTS_LIBS}) 248target_link_libraries(pbkdf2 ${OPENSSL_LIBS})
261add_test(pbkdf2 pbkdf2) 249add_test(pbkdf2 pbkdf2)
262 250
263# pidwraptest 251# pidwraptest
@@ -265,23 +253,23 @@ add_test(pbkdf2 pbkdf2)
265# awkward on systems with slow fork 253# awkward on systems with slow fork
266if(ENABLE_EXTRATESTS AND NOT MSVC) 254if(ENABLE_EXTRATESTS AND NOT MSVC)
267 add_executable(pidwraptest pidwraptest.c) 255 add_executable(pidwraptest pidwraptest.c)
268 target_link_libraries(pidwraptest ${TESTS_LIBS}) 256 target_link_libraries(pidwraptest ${OPENSSL_LIBS})
269 add_test(pidwraptest ${CMAKE_CURRENT_SOURCE_DIR}/pidwraptest.sh) 257 add_test(pidwraptest ${CMAKE_CURRENT_SOURCE_DIR}/pidwraptest.sh)
270endif() 258endif()
271 259
272# pkcs7test 260# pkcs7test
273add_executable(pkcs7test pkcs7test.c) 261add_executable(pkcs7test pkcs7test.c)
274target_link_libraries(pkcs7test ${TESTS_LIBS}) 262target_link_libraries(pkcs7test ${OPENSSL_LIBS})
275add_test(pkcs7test pkcs7test) 263add_test(pkcs7test pkcs7test)
276 264
277# poly1305test 265# poly1305test
278add_executable(poly1305test poly1305test.c) 266add_executable(poly1305test poly1305test.c)
279target_link_libraries(poly1305test ${TESTS_LIBS}) 267target_link_libraries(poly1305test ${OPENSSL_LIBS})
280add_test(poly1305test poly1305test) 268add_test(poly1305test poly1305test)
281 269
282# pq_test 270# pq_test
283add_executable(pq_test pq_test.c) 271add_executable(pq_test pq_test.c)
284target_link_libraries(pq_test ${TESTS_LIBS}) 272target_link_libraries(pq_test ${OPENSSL_LIBS})
285if(NOT MSVC) 273if(NOT MSVC)
286 add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh) 274 add_test(NAME pq_test COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh)
287else() 275else()
@@ -291,22 +279,22 @@ set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}")
291 279
292# randtest 280# randtest
293add_executable(randtest randtest.c) 281add_executable(randtest randtest.c)
294target_link_libraries(randtest ${TESTS_LIBS}) 282target_link_libraries(randtest ${OPENSSL_LIBS})
295add_test(randtest randtest) 283add_test(randtest randtest)
296 284
297# rc2test 285# rc2test
298add_executable(rc2test rc2test.c) 286add_executable(rc2test rc2test.c)
299target_link_libraries(rc2test ${TESTS_LIBS}) 287target_link_libraries(rc2test ${OPENSSL_LIBS})
300add_test(rc2test rc2test) 288add_test(rc2test rc2test)
301 289
302# rc4test 290# rc4test
303add_executable(rc4test rc4test.c) 291add_executable(rc4test rc4test.c)
304target_link_libraries(rc4test ${TESTS_LIBS}) 292target_link_libraries(rc4test ${OPENSSL_LIBS})
305add_test(rc4test rc4test) 293add_test(rc4test rc4test)
306 294
307# rfc5280time 295# rfc5280time
308add_executable(rfc5280time rfc5280time.c) 296add_executable(rfc5280time rfc5280time.c)
309target_link_libraries(rfc5280time ${TESTS_LIBS}) 297target_link_libraries(rfc5280time ${OPENSSL_LIBS})
310if(SMALL_TIME_T) 298if(SMALL_TIME_T)
311 add_test(rfc5280time ${CMAKE_CURRENT_SOURCE_DIR}/rfc5280time_small.test) 299 add_test(rfc5280time ${CMAKE_CURRENT_SOURCE_DIR}/rfc5280time_small.test)
312else() 300else()
@@ -315,17 +303,17 @@ endif()
315 303
316# rmdtest 304# rmdtest
317add_executable(rmdtest rmdtest.c) 305add_executable(rmdtest rmdtest.c)
318target_link_libraries(rmdtest ${TESTS_LIBS}) 306target_link_libraries(rmdtest ${OPENSSL_LIBS})
319add_test(rmdtest rmdtest) 307add_test(rmdtest rmdtest)
320 308
321# rsa_test 309# rsa_test
322add_executable(rsa_test rsa_test.c) 310add_executable(rsa_test rsa_test.c)
323target_link_libraries(rsa_test ${TESTS_LIBS}) 311target_link_libraries(rsa_test ${OPENSSL_LIBS})
324add_test(rsa_test rsa_test) 312add_test(rsa_test rsa_test)
325 313
326# servertest 314# servertest
327add_executable(servertest servertest.c) 315add_executable(servertest servertest.c)
328target_link_libraries(servertest ${TESTS_LIBS}) 316target_link_libraries(servertest ${OPENSSL_LIBS})
329if(NOT MSVC) 317if(NOT MSVC)
330 add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh) 318 add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh)
331else() 319else()
@@ -335,27 +323,27 @@ set_tests_properties(servertest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR
335 323
336# sha1test 324# sha1test
337add_executable(sha1test sha1test.c) 325add_executable(sha1test sha1test.c)
338target_link_libraries(sha1test ${TESTS_LIBS}) 326target_link_libraries(sha1test ${OPENSSL_LIBS})
339add_test(sha1test sha1test) 327add_test(sha1test sha1test)
340 328
341# sha256test 329# sha256test
342add_executable(sha256test sha256test.c) 330add_executable(sha256test sha256test.c)
343target_link_libraries(sha256test ${TESTS_LIBS}) 331target_link_libraries(sha256test ${OPENSSL_LIBS})
344add_test(sha256test sha256test) 332add_test(sha256test sha256test)
345 333
346# sha512test 334# sha512test
347add_executable(sha512test sha512test.c) 335add_executable(sha512test sha512test.c)
348target_link_libraries(sha512test ${TESTS_LIBS}) 336target_link_libraries(sha512test ${OPENSSL_LIBS})
349add_test(sha512test sha512test) 337add_test(sha512test sha512test)
350 338
351# ssl_versions 339# ssl_versions
352add_executable(ssl_versions ssl_versions.c) 340add_executable(ssl_versions ssl_versions.c)
353target_link_libraries(ssl_versions ${TESTS_LIBS}) 341target_link_libraries(ssl_versions ${OPENSSL_LIBS})
354add_test(ssl_versions ssl_versions) 342add_test(ssl_versions ssl_versions)
355 343
356# ssltest 344# ssltest
357add_executable(ssltest ssltest.c) 345add_executable(ssltest ssltest.c)
358target_link_libraries(ssltest ${TESTS_LIBS}) 346target_link_libraries(ssltest ${OPENSSL_LIBS})
359if(NOT MSVC) 347if(NOT MSVC)
360 add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh) 348 add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh)
361else() 349else()
@@ -389,12 +377,12 @@ set_tests_properties(testrsa PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}")
389 377
390# timingsafe 378# timingsafe
391add_executable(timingsafe timingsafe.c) 379add_executable(timingsafe timingsafe.c)
392target_link_libraries(timingsafe ${TESTS_LIBS}) 380target_link_libraries(timingsafe ${OPENSSL_LIBS})
393add_test(timingsafe timingsafe) 381add_test(timingsafe timingsafe)
394 382
395# tlsexttest 383# tlsexttest
396add_executable(tlsexttest tlsexttest.c) 384add_executable(tlsexttest tlsexttest.c)
397target_link_libraries(tlsexttest ${TESTS_LIBS}) 385target_link_libraries(tlsexttest ${OPENSSL_LIBS})
398add_test(tlsexttest tlsexttest) 386add_test(tlsexttest tlsexttest)
399 387
400# tlstest 388# tlstest
@@ -407,7 +395,7 @@ else()
407endif() 395endif()
408 396
409add_executable(tlstest ${TLSTEST_SRC}) 397add_executable(tlstest ${TLSTEST_SRC})
410target_link_libraries(tlstest ${TESTS_LIBS}) 398target_link_libraries(tlstest ${OPENSSL_LIBS})
411if(NOT MSVC) 399if(NOT MSVC)
412 add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh) 400 add_test(NAME tlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tlstest.sh)
413else() 401else()
@@ -417,36 +405,25 @@ set_tests_properties(tlstest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}")
417 405
418# tls_ext_alpn 406# tls_ext_alpn
419add_executable(tls_ext_alpn tls_ext_alpn.c) 407add_executable(tls_ext_alpn tls_ext_alpn.c)
420target_link_libraries(tls_ext_alpn ${TESTS_LIBS}) 408target_link_libraries(tls_ext_alpn ${OPENSSL_LIBS})
421add_test(tls_ext_alpn tls_ext_alpn) 409add_test(tls_ext_alpn tls_ext_alpn)
422 410
423# tls_prf 411# tls_prf
424add_executable(tls_prf tls_prf.c) 412add_executable(tls_prf tls_prf.c)
425target_link_libraries(tls_prf ${TESTS_LIBS}) 413target_link_libraries(tls_prf ${OPENSSL_LIBS})
426add_test(tls_prf tls_prf) 414add_test(tls_prf tls_prf)
427 415
428# utf8test 416# utf8test
429add_executable(utf8test utf8test.c) 417add_executable(utf8test utf8test.c)
430target_link_libraries(utf8test ${TESTS_LIBS}) 418target_link_libraries(utf8test ${OPENSSL_LIBS})
431add_test(utf8test utf8test) 419add_test(utf8test utf8test)
432 420
433# verifytest 421# verifytest
434add_executable(verifytest verifytest.c) 422add_executable(verifytest verifytest.c)
435target_link_libraries(verifytest tls ${TESTS_LIBS}) 423target_link_libraries(verifytest tls ${OPENSSL_LIBS})
436add_test(verifytest verifytest) 424add_test(verifytest verifytest)
437 425
438# x25519test 426# x25519test
439add_executable(x25519test x25519test.c) 427add_executable(x25519test x25519test.c)
440target_link_libraries(x25519test ${TESTS_LIBS}) 428target_link_libraries(x25519test ${OPENSSL_LIBS})
441add_test(x25519test x25519test) 429add_test(x25519test x25519test)
442
443if(ENABLE_VSTEST AND USE_SHARED)
444 add_custom_command(TARGET x25519test POST_BUILD
445 COMMAND "${CMAKE_COMMAND}" -E copy
446 "$<TARGET_FILE:tls-shared>"
447 "$<TARGET_FILE:ssl-shared>"
448 "$<TARGET_FILE:crypto-shared>"
449 "${CMAKE_CURRENT_BINARY_DIR}"
450 COMMENT "Copying DLLs for regression tests")
451endif()
452