tests: added check for operation under different processes and DTLS
[gnutls:gnutls.git] / tests / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2004-2012 Free Software Foundation, Inc.
3 #
4 # Author: Simon Josefsson
5 #
6 # This file is part of GnuTLS.
7 #
8 # This file is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This file is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 # General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this file; if not, write to the Free Software Foundation,
20 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
22 SUBDIRS = . rsa-md5-collision pkcs1-padding pkcs8-decode pkcs12-decode  \
23         userid cert-tests key-tests sha2 safe-renegotiation dsa scripts ecdsa \
24         slow dtls srp
25
26 if ENABLE_OPENPGP
27 SUBDIRS += openpgp-certs
28 endif
29
30 if WANT_TEST_SUITE
31 SUBDIRS += suite
32 endif
33
34 EXTRA_DIST = suppressions.valgrind eagain-common.h test-chains.h \
35         certs/ca-cert-ecc.pem  certs/cert-ecc256.pem  certs/cert-ecc521.pem \
36         certs/cert-rsa-2432.pem certs/ecc384.pem certs/ecc.pem \
37         certs/ca-ecc.pem certs/cert-ecc384.pem certs/cert-ecc.pem certs/ecc256.pem \
38         certs/ecc521.pem certs/rsa-2432.pem x509cert-dir/ca.pem
39
40 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
41 AM_CPPFLAGS = \
42         -I$(top_srcdir)/gl                      \
43         -I$(top_builddir)/gl                    \
44         -I$(top_srcdir)/lib/includes            \
45         -I$(top_builddir)/lib/includes          \
46         -I$(top_srcdir)/libdane/includes        \
47         -I$(top_builddir)/libdane/includes      \
48         -I$(top_srcdir)/extra/includes          \
49         -I$(top_builddir)/extra/includes        \
50         -I$(top_srcdir)/lib                     \
51         -I$(top_srcdir)/doc/examples
52
53 AM_LDFLAGS = -no-install
54 LDADD = ../lib/libgnutls.la \
55         ../gl/libgnu.la \
56         libutils.la \
57         $(LTLIBGCRYPT)  \
58         $(LIBSOCKET) $(INET_NTOP_LIB) $(INET_PTON_LIB)
59
60 dane_LDADD = $(LDADD) ../libdane/libgnutls-dane.la
61
62 if ENABLE_MINITASN1
63 AM_CPPFLAGS += -I$(srcdir)/../lib/minitasn1
64 endif
65
66 noinst_LTLIBRARIES = libutils.la
67 libutils_la_SOURCES = utils.h utils.c
68 libutils_la_LIBADD = ../gl/libgnu.la
69
70 ctests = mini-record-2 simple gc set_pkcs12_cred certder certuniqueid   \
71          mpi certificate_set_x509_crl dn parse_ca moredn record-sizes \
72          hostname-check cve-2008-4989 pkcs12_s2k chainverify record-sizes-range \
73          crq_key_id x509sign-verify cve-2009-1415 cve-2009-1416         \
74          crq_apis init_roundtrip pkcs12_s2k_pem dn2 mini-eagain         \
75          nul-in-x509-names x509_altname pkcs12_encode mini-x509         \
76          mini-rehandshake rng-fork mini-eagain-dtls resume-dtls \
77          x509cert x509cert-tl infoaccess mini-dtls-hello-verify \
78          mini-tdb mini-dtls-rehandshake mini-alpn mini-dtls-large \
79          mini-termination mini-x509-cas mini-x509-2 pkcs12_simple \
80          mini-emsgsize-dtls chainverify-unsorted mini-overhead \
81          mini-dtls-heartbeat mini-x509-callbacks key-openssl priorities \
82          mini-dtls-srtp rsa-encrypt-decrypt mini-loss-time \
83          mini-record mini-dtls-record mini-handshake-timeout mini-record-range \
84          mini-cert-status mini-rsa-psk global-init sec-params \
85          fips-test mini-global-load name-constraints x509-extensions \
86          long-session-id mini-x509-callbacks-intr mini-dtls-lowmtu \
87          crlverify mini-dtls-discard init_fds mini-record-failure \
88          mini-rehandshake-2 custom-urls set_x509_key_mem set_x509_key_file \
89          mini-chain-unsorted x509-verify-with-crl mini-dtls-mtu \
90          mini-dtls-record-asym openpgp-callback key-import-export \
91          mini-dtls-fork
92
93 if ENABLE_OCSP
94 ctests += ocsp
95 endif
96
97 if ENABLE_DANE
98 ctests += dane
99 endif
100
101 if ENABLE_OPENSSL
102 if !ENABLE_FIPS140
103 ctests +=  openssl
104 openssl_LDADD = ../extra/libgnutls-openssl.la $(LDADD)
105 endif
106 endif
107
108 if ENABLE_OPENPGP
109 ctests += openpgp-auth openpgp-auth2 openpgp-keyring pgps2kgnu
110 endif
111
112 if HAVE_FORK
113 ctests += x509self x509dn anonself pskself dhepskself   \
114         resume setcredcrash
115
116 if ENABLE_OPENPGP
117 ctests += openpgpself 
118 endif
119
120 endif
121
122 check_PROGRAMS = $(ctests)
123 dist_check_SCRIPTS = rfc2253-escape-test
124
125 TESTS = $(ctests) $(dist_check_SCRIPTS)
126
127 TESTS_ENVIRONMENT =                                             \
128         LC_ALL="C"                                              \
129         CAFILE=$(srcdir)/cert-tests/ca-certs.pem                \
130         PKCS12_MANY_CERTS_FILE=$(srcdir)/pkcs12-decode/pkcs12_5certs.p12        \
131         PKCS12FILE=$(srcdir)/pkcs12-decode/client.p12           \
132         PKCS12PASSWORD=foobar                                   \
133         PKCS12FILE_2=$(srcdir)/pkcs12-decode/pkcs12_2certs.p12  \
134         PKCS12PASSWORD_2=""                                     \
135         PKCS12PATH=$(srcdir)/pkcs12-decode/                     \
136         X509CERTDIR=$(srcdir)/x509cert-dir/                     \
137         EXEEXT=$(EXEEXT)                                        \
138         top_builddir="$(top_builddir)"                          \
139         srcdir="$(srcdir)"
140
141 if WANT_TEST_SUITE
142 LOG_COMPILER = $(VALGRIND)
143 endif