remove p11-kit in gnutls.spec file
[platform/upstream/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
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)/extra/includes  \
47         -I$(top_builddir)/extra/includes        \
48         -I$(top_srcdir)/lib                     \
49         -I$(top_srcdir)/doc/examples
50
51 AM_LDFLAGS = -no-install
52 LDADD = ../lib/libgnutls.la \
53         ../gl/libgnu.la \
54         libutils.la \
55         $(LTLIBGCRYPT)  \
56         $(LIBSOCKET) $(INET_NTOP_LIB) $(INET_PTON_LIB)
57
58 if ENABLE_MINITASN1
59 AM_CPPFLAGS += -I$(srcdir)/../lib/minitasn1
60 endif
61
62 noinst_LTLIBRARIES = libutils.la
63 libutils_la_SOURCES = utils.h utils.c
64 libutils_la_LIBADD = ../gl/libgnu.la
65
66 ctests = mini-record-2 simple gc set_pkcs12_cred certder certuniqueid   \
67          mpi certificate_set_x509_crl dn parse_ca moredn record-sizes \
68          hostname-check cve-2008-4989 pkcs12_s2k chainverify record-sizes-range \
69          crq_key_id x509sign-verify cve-2009-1415 cve-2009-1416         \
70          crq_apis init_roundtrip pkcs12_s2k_pem dn2 mini-eagain         \
71          nul-in-x509-names x509_altname pkcs12_encode mini-x509         \
72          mini-rehandshake rng-fork mini-eagain-dtls resume-dtls \
73          x509cert x509cert-tl infoaccess mini-dtls-hello-verify \
74          mini-tdb mini-dtls-rehandshake mini-alpn mini-dtls-large \
75          mini-termination mini-x509-cas mini-x509-2 pkcs12_simple \
76          mini-emsgsize-dtls chainverify-unsorted mini-overhead \
77          mini-dtls-heartbeat mini-x509-callbacks key-openssl priorities \
78          mini-dtls-srtp rsa-encrypt-decrypt mini-loss-time \
79          mini-record mini-dtls-record mini-handshake-timeout mini-record-range \
80          mini-cert-status mini-rsa-psk global-init sec-params \
81          fips-test mini-global-load name-constraints x509-extensions \
82          long-session-id mini-x509-callbacks-intr
83
84 if ENABLE_OCSP
85 ctests += ocsp
86 endif
87
88 if ENABLE_OPENSSL
89 if !ENABLE_FIPS140
90 ctests +=  openssl
91 openssl_LDADD = ../extra/libgnutls-openssl.la $(LDADD)
92 endif
93 endif
94
95 if ENABLE_OPENPGP
96 ctests += openpgp-auth openpgp-auth2 openpgp-keyring pgps2kgnu
97 endif
98
99 if HAVE_FORK
100 ctests += x509self x509dn anonself pskself dhepskself   \
101         resume setcredcrash
102
103 if ENABLE_OPENPGP
104 ctests += openpgpself 
105 endif
106
107 endif
108
109 check_PROGRAMS = $(ctests)
110 dist_check_SCRIPTS = rfc2253-escape-test
111
112 TESTS = $(ctests) $(dist_check_SCRIPTS)
113
114 TESTS_ENVIRONMENT =                                             \
115         LC_ALL="C"                                              \
116         CAFILE=$(srcdir)/cert-tests/ca-certs.pem                \
117         PKCS12_MANY_CERTS_FILE=$(srcdir)/pkcs12-decode/pkcs12_5certs.p12        \
118         PKCS12FILE=$(srcdir)/pkcs12-decode/client.p12           \
119         PKCS12PASSWORD=foobar                                   \
120         PKCS12FILE_2=$(srcdir)/pkcs12-decode/pkcs12_2certs.p12  \
121         PKCS12PASSWORD_2=""                                     \
122         PKCS12PATH=$(srcdir)/pkcs12-decode/                     \
123         EXEEXT=$(EXEEXT)                                        \
124         top_builddir="$(top_builddir)"                          \
125         srcdir="$(srcdir)"
126
127 if WANT_TEST_SUITE
128 LOG_COMPILER = $(VALGRIND)
129 endif