6ec03f73701bfd90b2d4f2b16d2b94f6f1bc0740
[openssl.git] / test / build.info
1 {-
2      use File::Spec::Functions;
3      sub rebase_files
4      {
5          my ($base, $files) = @_;
6          return join(" ", map { "$base/$_" } split(/\s+/, $files));
7      }
8 -}
9 IF[{- !$disabled{tests} -}]
10   PROGRAMS_NO_INST=\
11           aborttest \
12           sanitytest bntest \
13           ectest ecdsatest ecdhtest gmdifftest pbelutest ideatest \
14           md2test md4test md5test \
15           hmactest wp_test \
16           rc2test rc4test rc5test \
17           destest sha1test sha256t sha512t \
18           mdc2test rmdtest \
19           randtest dhtest enginetest casttest \
20           bftest ssltest_old dsatest exptest rsa_test \
21           evp_test evp_extra_test igetest v3nametest v3ext \
22           danetest heartbeat_test p5_crpt2_test bad_dtls_test \
23           constant_time_test verify_extra_test clienthellotest \
24           packettest asynctest secmemtest srptest memleaktest \
25           dtlsv1listentest ct_test threadstest afalgtest d2i_test \
26           ssl_test_ctx_test ssl_test x509aux cipherlist_test asynciotest \
27           bioprinttest sslapitest dtlstest bio_enc_test
28
29   SOURCE[aborttest]=aborttest.c
30   INCLUDE[aborttest]=../include
31   DEPEND[aborttest]=../libcrypto
32
33   SOURCE[sanitytest]=sanitytest.c
34   INCLUDE[sanitytest]=../include
35   DEPEND[sanitytest]=../libcrypto
36
37   SOURCE[bntest]=bntest.c
38   INCLUDE[bntest]=.. ../crypto/include ../include
39   DEPEND[bntest]=../libcrypto
40
41   SOURCE[ectest]=ectest.c
42   INCLUDE[ectest]=../include
43   DEPEND[ectest]=../libcrypto
44
45   SOURCE[ecdsatest]=ecdsatest.c
46   INCLUDE[ecdsatest]=../include
47   DEPEND[ecdsatest]=../libcrypto
48
49   SOURCE[ecdhtest]=ecdhtest.c
50   INCLUDE[ecdhtest]=../include
51   DEPEND[ecdhtest]=../libcrypto
52
53   SOURCE[gmdifftest]=gmdifftest.c
54   INCLUDE[gmdifftest]=../include
55   DEPEND[gmdifftest]=../libcrypto
56
57   SOURCE[pbelutest]=pbelutest.c
58   INCLUDE[pbelutest]=../include
59   DEPEND[pbelutest]=../libcrypto
60
61   SOURCE[ideatest]=ideatest.c
62   INCLUDE[ideatest]=../include
63   DEPEND[ideatest]=../libcrypto
64
65   SOURCE[md2test]=md2test.c
66   INCLUDE[md2test]=../include
67   DEPEND[md2test]=../libcrypto
68
69   SOURCE[md4test]=md4test.c
70   INCLUDE[md4test]=../include
71   DEPEND[md4test]=../libcrypto
72
73   SOURCE[md5test]=md5test.c
74   INCLUDE[md5test]=../include
75   DEPEND[md5test]=../libcrypto
76
77   SOURCE[hmactest]=hmactest.c
78   INCLUDE[hmactest]=../include
79   DEPEND[hmactest]=../libcrypto
80
81   SOURCE[wp_test]=wp_test.c
82   INCLUDE[wp_test]=../include
83   DEPEND[wp_test]=../libcrypto
84
85   SOURCE[rc2test]=rc2test.c
86   INCLUDE[rc2test]=../include
87   DEPEND[rc2test]=../libcrypto
88
89   SOURCE[rc4test]=rc4test.c
90   INCLUDE[rc4test]=../include
91   DEPEND[rc4test]=../libcrypto
92
93   SOURCE[rc5test]=rc5test.c
94   INCLUDE[rc5test]=../include
95   DEPEND[rc5test]=../libcrypto
96
97   SOURCE[destest]=destest.c
98   INCLUDE[destest]=../include
99   DEPEND[destest]=../libcrypto
100
101   SOURCE[sha1test]=sha1test.c
102   INCLUDE[sha1test]=../include
103   DEPEND[sha1test]=../libcrypto
104
105   SOURCE[sha256t]=sha256t.c
106   INCLUDE[sha256t]=../include
107   DEPEND[sha256t]=../libcrypto
108
109   SOURCE[sha512t]=sha512t.c
110   INCLUDE[sha512t]=../include
111   DEPEND[sha512t]=../libcrypto
112
113   SOURCE[mdc2test]=mdc2test.c
114   INCLUDE[mdc2test]=../include
115   DEPEND[mdc2test]=../libcrypto
116
117   SOURCE[rmdtest]=rmdtest.c
118   INCLUDE[rmdtest]=../include
119   DEPEND[rmdtest]=../libcrypto
120
121   SOURCE[randtest]=randtest.c
122   INCLUDE[randtest]=../include
123   DEPEND[randtest]=../libcrypto
124
125   SOURCE[dhtest]=dhtest.c
126   INCLUDE[dhtest]=../include
127   DEPEND[dhtest]=../libcrypto
128
129   SOURCE[enginetest]=enginetest.c
130   INCLUDE[enginetest]=../include
131   DEPEND[enginetest]=../libcrypto
132
133   SOURCE[casttest]=casttest.c
134   INCLUDE[casttest]=../include
135   DEPEND[casttest]=../libcrypto
136
137   SOURCE[bftest]=bftest.c
138   INCLUDE[bftest]=../include
139   DEPEND[bftest]=../libcrypto
140
141   SOURCE[ssltest_old]=ssltest_old.c
142   INCLUDE[ssltest_old]=.. ../include
143   DEPEND[ssltest_old]=../libcrypto ../libssl
144
145   SOURCE[dsatest]=dsatest.c
146   INCLUDE[dsatest]=../include
147   DEPEND[dsatest]=../libcrypto
148
149   SOURCE[exptest]=exptest.c
150   INCLUDE[exptest]=../include
151   DEPEND[exptest]=../libcrypto
152
153   SOURCE[rsa_test]=rsa_test.c
154   INCLUDE[rsa_test]=.. ../include
155   DEPEND[rsa_test]=../libcrypto
156
157   SOURCE[evp_test]=evp_test.c
158   INCLUDE[evp_test]=../include
159   DEPEND[evp_test]=../libcrypto
160
161   SOURCE[evp_extra_test]=evp_extra_test.c
162   INCLUDE[evp_extra_test]=../include
163   DEPEND[evp_extra_test]=../libcrypto
164
165   SOURCE[igetest]=igetest.c
166   INCLUDE[igetest]=.. ../include
167   DEPEND[igetest]=../libcrypto
168
169   SOURCE[v3nametest]=v3nametest.c
170   INCLUDE[v3nametest]=../include
171   DEPEND[v3nametest]=../libcrypto
172
173   SOURCE[v3ext]=v3ext.c
174   INCLUDE[v3ext]=../include
175   DEPEND[v3ext]=../libcrypto
176
177   SOURCE[danetest]=danetest.c
178   INCLUDE[danetest]=../include
179   DEPEND[danetest]=../libcrypto ../libssl
180
181   SOURCE[heartbeat_test]=heartbeat_test.c testutil.c
182   INCLUDE[heartbeat_test]=.. ../include
183   DEPEND[heartbeat_test]=../libcrypto ../libssl
184
185   SOURCE[p5_crpt2_test]=p5_crpt2_test.c
186   INCLUDE[p5_crpt2_test]=../include
187   DEPEND[p5_crpt2_test]=../libcrypto
188
189   SOURCE[constant_time_test]=constant_time_test.c
190   INCLUDE[constant_time_test]=.. ../include
191   DEPEND[constant_time_test]=../libcrypto
192
193   SOURCE[verify_extra_test]=verify_extra_test.c
194   INCLUDE[verify_extra_test]=../include
195   DEPEND[verify_extra_test]=../libcrypto
196
197   SOURCE[clienthellotest]=clienthellotest.c
198   INCLUDE[clienthellotest]=../include
199   DEPEND[clienthellotest]=../libcrypto ../libssl
200
201   SOURCE[bad_dtls_test]=bad_dtls_test.c
202   INCLUDE[bad_dtls_test]=../include
203   DEPEND[bad_dtls_test]=../libcrypto ../libssl
204
205   SOURCE[packettest]=packettest.c
206   INCLUDE[packettest]=../include
207   DEPEND[packettest]=../libcrypto
208
209   SOURCE[asynctest]=asynctest.c
210   INCLUDE[asynctest]=.. ../include
211   DEPEND[asynctest]=../libcrypto
212
213   SOURCE[secmemtest]=secmemtest.c
214   INCLUDE[secmemtest]=../include
215   DEPEND[secmemtest]=../libcrypto
216
217   SOURCE[srptest]=srptest.c
218   INCLUDE[srptest]=../include
219   DEPEND[srptest]=../libcrypto
220
221   SOURCE[memleaktest]=memleaktest.c
222   INCLUDE[memleaktest]=../include
223   DEPEND[memleaktest]=../libcrypto
224
225   SOURCE[dtlsv1listentest]=dtlsv1listentest.c
226   INCLUDE[dtlsv1listentest]=.. ../include
227   DEPEND[dtlsv1listentest]=../libssl
228
229   SOURCE[ct_test]=ct_test.c testutil.c
230   INCLUDE[ct_test]=../crypto/include ../include
231   DEPEND[ct_test]=../libcrypto
232
233   SOURCE[threadstest]=threadstest.c
234   INCLUDE[threadstest]=.. ../include
235   DEPEND[threadstest]=../libcrypto
236
237   SOURCE[afalgtest]=afalgtest.c
238   INCLUDE[afalgtest]=.. ../include
239   DEPEND[afalgtest]=../libcrypto
240
241   SOURCE[d2i_test]=d2i_test.c testutil.c
242   INCLUDE[d2i_test]=.. ../include
243   DEPEND[d2i_test]=../libcrypto
244
245   SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c ssl_test_ctx.c testutil.c
246   INCLUDE[ssl_test_ctx_test]=.. ../include
247   DEPEND[ssl_test_ctx_test]=../libcrypto
248
249   SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c testutil.c handshake_helper.c
250   INCLUDE[ssl_test]=.. ../include
251   DEPEND[ssl_test]=../libcrypto ../libssl
252
253   SOURCE[cipherlist_test]=cipherlist_test.c testutil.c
254   INCLUDE[cipherlist_test]=.. ../include
255   DEPEND[cipherlist_test]=../libcrypto ../libssl
256
257   INCLUDE[testutil.o]=..
258   INCLUDE[ssl_test_ctx.o]=../include
259   INCLUDE[handshake_helper.o]=../include
260   INCLUDE[ssltestlib.o]=../include
261
262   SOURCE[x509aux]=x509aux.c
263   INCLUDE[x509aux]=../include
264   DEPEND[x509aux]=../libcrypto
265
266   SOURCE[asynciotest]=asynciotest.c ssltestlib.c
267   INCLUDE[asynciotest]=../include
268   DEPEND[asynciotest]=../libcrypto ../libssl
269
270   SOURCE[bioprinttest]=bioprinttest.c
271   INCLUDE[bioprinttest]=../include
272   DEPEND[bioprinttest]=../libcrypto
273
274   SOURCE[sslapitest]=sslapitest.c ssltestlib.c testutil.c
275   INCLUDE[sslapitest]=../include
276   DEPEND[sslapitest]=../libcrypto ../libssl
277
278   SOURCE[dtlstest]=dtlstest.c ssltestlib.c testutil.c
279   INCLUDE[dtlstest]=../include .
280   DEPEND[dtlstest]=../libcrypto ../libssl
281
282   SOURCE[bio_enc_test]=bio_enc_test.c
283   INCLUDE[bio_enc_test]=../include
284   DEPEND[bio_enc_test]=../libcrypto
285
286   IF[{- !$disabled{psk} -}]
287     PROGRAMS_NO_INST=dtls_mtu_test
288     SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
289     INCLUDE[dtls_mtu_test]=.. ../include
290     DEPEND[dtls_mtu_test]=../libcrypto ../libssl
291   ENDIF
292
293   IF[{- !$disabled{shared} -}]
294     PROGRAMS_NO_INST=shlibloadtest
295     SOURCE[shlibloadtest]=shlibloadtest.c
296     INCLUDE[shlibloadtest]=../include
297   ENDIF
298
299   IF[{- $disabled{shared} -}]
300     PROGRAMS_NO_INST=wpackettest cipher_overhead_test
301     SOURCE[wpackettest]=wpackettest.c testutil.c
302     INCLUDE[wpackettest]=../include
303     DEPEND[wpackettest]=../libcrypto ../libssl
304
305     SOURCE[cipher_overhead_test]=cipher_overhead_test.c
306     INCLUDE[cipher_overhead_test]=.. ../include
307     DEPEND[cipher_overhead_test]=../libcrypto ../libssl
308   ENDIF
309
310   # Internal test programs.  These are essentially a collection of internal
311   # test routines.  Because they sometimes need to reach internal symbols that
312   # aren't available through the shared library (at least on Linux, Solaris,
313   # Windows and VMS, where the exported symbols are those listed in util/*.num),
314   # these programs may be built on files directly picked from inside crypto/
315   # or ssl/, to test using symbols that exist in those specific files.  These
316   # programs will also be linked with libcrypto / libssl, so we don't pick
317   # out more specific files than necessary.
318   # This might mean we have multiply defined symbols, but since linking is
319   # ordered with object files first and libraries after, the symbols from the
320   # object files will be chosen before those in the libraries.  This is handled
321   # properly by all linkers.
322   # Note that when building with static libraries, none of those extra files
323   # are needed, since all symbols are available anyway, regardless of what's
324   # listed in util/*.num.
325   PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test
326   IF[{- !$disabled{mdc2} -}]
327     PROGRAMS_NO_INST=mdc2_internal_test
328   ENDIF
329   IF[{- !$disabled{poly1305} -}]
330     PROGRAMS_NO_INST=poly1305_internal_test
331   ENDIF
332
333   SOURCE[poly1305_internal_test]=poly1305_internal_test.c testutil.c
334   IF[{- !$disabled{shared} -}]
335     SOURCE[poly1305_internal_test]= ../crypto/poly1305/poly1305.c \
336         {- rebase_files("../crypto/poly1305", $target{poly1305_asm_src}) -} \
337         {- rebase_files("../crypto", $target{cpuid_asm_src}) -} \
338         ../crypto/cryptlib.c
339   ENDIF
340   INCLUDE[poly1305_internal_test]=.. ../include ../crypto/include
341   DEPEND[poly1305_internal_test]=../libcrypto
342
343   SOURCE[asn1_internal_test]=asn1_internal_test.c testutil.c
344   IF[{- !$disabled{shared} -}]
345     SOURCE[asn1_internal_test]= ../crypto/asn1/a_strnid.c \
346         ../crypto/rsa/rsa_ameth.c ../crypto/dsa/dsa_ameth.c \
347         ../crypto/dh/dh_ameth.c ../crypto/ec/ec_ameth.c \
348         ../crypto/hmac/hm_ameth.c ../crypto/cmac/cm_ameth.c \
349         ../crypto/ec/ecx_meth.c ../crypto/ec/curve25519.c
350   ENDIF
351   INCLUDE[asn1_internal_test]=.. ../include ../crypto/include
352   DEPEND[asn1_internal_test]=../libcrypto
353
354   SOURCE[modes_internal_test]=modes_internal_test.c testutil.c
355   IF[{- !$disabled{shared} -}]
356     SOURCE[modes_internal_test]= \
357         {- rebase_files("../crypto", $target{cpuid_asm_src}); -} \
358         ../crypto/cryptlib.c
359   ENDIF
360   INCLUDE[modes_internal_test]=.. ../include
361   DEPEND[modes_internal_test]=../libcrypto
362
363   # The reason for the huge amount of directly included x509v3 files
364   # is that a table that is checked by x509_internal_test refers to
365   # structures that are spread all over those files.
366   SOURCE[x509_internal_test]=x509_internal_test.c testutil.c
367   IF[{- !$disabled{shared} -}]
368     SOURCE[x509_internal_test]= ../crypto/x509v3/v3_bitst.c \
369         ../crypto/x509v3/v3_ia5.c ../crypto/x509v3/v3_skey.c \
370         ../crypto/x509v3/v3_pku.c ../crypto/x509v3/v3_alt.c \
371         ../crypto/x509v3/v3_bcons.c ../crypto/x509v3/v3_int.c \
372         ../crypto/x509v3/v3_cpols.c ../crypto/x509v3/v3_akey.c \
373         ../crypto/x509v3/v3_crld.c ../crypto/x509v3/v3_utl.c \
374         ../crypto/x509v3/v3_extku.c ../crypto/x509v3/v3_enum.c \
375         ../crypto/x509v3/v3_sxnet.c ../crypto/x509v3/v3_info.c \
376         ../crypto/x509v3/v3_addr.c ../crypto/x509v3/v3_asid.c \
377         ../crypto/x509v3/v3_pcons.c ../crypto/x509v3/v3_pmaps.c \
378         ../crypto/x509v3/v3_pci.c ../crypto/x509v3/v3_ncons.c \
379         ../crypto/x509v3/v3_tlsf.c ../crypto/ocsp/v3_ocsp.c \
380         ../crypto/ct/ct_x509v3.c ../crypto/asn1/a_strex.c
381   ENDIF
382   INCLUDE[x509_internal_test]=.. ../include
383   DEPEND[x509_internal_test]=../libcrypto
384
385   SOURCE[mdc2_internal_test]=mdc2_internal_test.c testutil.c
386   INCLUDE[mdc2_internal_test]=.. ../include
387   DEPEND[mdc2_internal_test]=../libcrypto
388
389   # We disable this test completely in a shared build because it deliberately
390   # redefines some internal libssl symbols. This doesn't work in a non-shared
391   # build
392   IF[{- !$disabled{shared} -}]
393     PROGRAMS_NO_INST=tls13secretstest
394     SOURCE[tls13secretstest]=tls13secretstest.c testutil.c
395     SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
396     INCLUDE[tls13secretstest]=.. ../include
397     DEPEND[tls13secretstest]=../libcrypto ../libssl
398   ENDIF
399 ENDIF
400
401 {-
402    use File::Spec::Functions;
403    use File::Basename;
404    use if $^O ne "VMS", 'File::Glob' => qw/glob/;
405
406    my @nogo_headers = ( "asn1_mac.h",
407                         "__decc_include_prologue.h",
408                         "__decc_include_epilogue.h" );
409    my @headerfiles = glob catfile($sourcedir,
410                                   updir(), "include", "openssl", "*.h");
411
412    foreach my $headerfile (@headerfiles) {
413        my $name = basename($headerfile, ".h");
414        next if $disabled{$name};
415        next if grep { $_ eq lc("$name.h") } @nogo_headers;
416        $OUT .= <<"_____";
417
418   PROGRAMS_NO_INST=buildtest_$name
419   GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
420   SOURCE[buildtest_$name]=buildtest_$name.c
421   INCLUDE[buildtest_$name]=../include
422   DEPEND[buildtest_$name]=../libssl ../libcrypto
423 _____
424    }
425 -}