Tizen 2.0 Release
[external/libgnutls26.git] / tests / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
3 # Foundation, Inc.
4 #
5 # Author: Simon Josefsson
6 #
7 # This file is part of GnuTLS.
8 #
9 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # This file is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this file; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23 SUBDIRS = . rsa-md5-collision pkcs1-padding pkcs8-decode pkcs12-decode  \
24         userid pathlen key-id sha2 safe-renegotiation dsa
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
35
36 AM_CFLAGS = $(WARN_CFLAGS) $(WERROR_CFLAGS)
37 AM_CPPFLAGS = \
38         -I$(top_srcdir)/gl                      \
39         -I$(top_builddir)/gl                    \
40         -I$(top_srcdir)/lib/includes            \
41         -I$(top_builddir)/lib/includes          \
42         -I$(top_srcdir)/libextra/includes       \
43         -I$(top_builddir)/libextra/includes     \
44         -I$(top_srcdir)/lib                     \
45         -I$(top_srcdir)/doc/examples
46
47 AM_LDFLAGS = -no-install
48 LDADD = ../lib/libgnutls.la \
49         ../gl/libgnu.la \
50         libutils.la \
51         $(LTLIBGCRYPT)  \
52         $(LIBSOCKET) $(INET_NTOP_LIB) $(INET_PTON_LIB)
53
54 if ENABLE_MINITASN1
55 AM_CPPFLAGS += -I$(srcdir)/../lib/minitasn1
56 endif
57
58 noinst_LTLIBRARIES = libutils.la
59 libutils_la_SOURCES = utils.h utils.c
60
61 ctests = simple gc set_pkcs12_cred certder certuniqueid mpi                     \
62         certificate_set_x509_crl dn parse_ca moredn crypto_rng mini     \
63         hostname-check cve-2008-4989 pkcs12_s2k chainverify     \
64         crq_key_id x509sign-verify cve-2009-1415 cve-2009-1416          \
65         crq_apis init_roundtrip pkcs12_s2k_pem dn2 mini-eagain          \
66         nul-in-x509-names x509_altname pkcs12_encode mini-x509          \
67         mini-x509-rehandshake rng-fork x509cert gendh
68
69 if ENABLE_OPENSSL
70 ctests +=  openssl
71 openssl_LDADD = $(LDADD) ../libextra/libgnutls-openssl.la
72 endif
73
74 if ENABLE_OPENPGP
75 ctests += openpgp-auth openpgp-keyring pgps2kgnu
76 openpgp_keyring_LDADD = $(LDADD) ../libextra/libgnutls-extra.la
77 endif
78
79 if HAVE_FORK
80 ctests += x509self x509dn anonself pskself dhepskself   \
81         resume setcredcrash
82
83 if ENABLE_OPENPGP
84 ctests += openpgpself 
85 endif
86
87 endif
88
89 check_PROGRAMS = $(ctests)
90 dist_check_SCRIPTS = rfc2253-escape-test
91
92 TESTS = $(ctests) $(dist_check_SCRIPTS)
93
94 TESTS_ENVIRONMENT =                                             \
95         PKCS12FILE=$(srcdir)/pkcs12-decode/client.p12           \
96         PKCS12PASSWORD=foobar                                   \
97         PKCS12FILE_2=$(srcdir)/pkcs12-decode/pkcs12_2certs.p12  \
98         PKCS12PASSWORD_2=""                                     \
99         EXEEXT=$(EXEEXT)                                        \
100         srcdir="$(srcdir)"
101
102 if WANT_TEST_SUITE
103 TESTS_ENVIRONMENT += $(VALGRIND)
104 endif