Imported Upstream version 1.6.5
[platform/upstream/libksba.git] / tests / Makefile.am
1 # Makefile.am - for the KSBA regression tests
2 #       Copyright (C) 2001, 2003 g10 Code GmbH
3 #
4 # This file is part of KSBA.
5 #
6 # KSBA is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # KSBA is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, see <http://www.gnu.org/licenses/>.
18
19 ## Process this file with automake to produce Makefile.in
20
21 TESTS_ENVIRONMENT =
22
23 test_certs = samples/cert_dfn_pca01.der samples/cert_dfn_pca15.der \
24              samples/cert_g10code_test1.der samples/crl_testpki_testpca.der \
25              samples/authority.crt samples/betsy.crt samples/bull.crt \
26              samples/ov-ocsp-server.crt samples/ov-userrev.crt \
27              samples/ov-root-ca-cert.crt samples/ov-serverrev.crt \
28              samples/ov-user.crt samples/ov-server.crt  \
29              samples/ov2-root-ca-cert.crt samples/ov2-ocsp-server.crt \
30              samples/ov2-user.crt samples/ov2-userrev.crt \
31              samples/secp256r1-sha384_cert.crt \
32              samples/secp256r1-sha512_cert.crt \
33              samples/secp384r1-sha512_cert.crt \
34              samples/openssl-secp256r1ca.cert.crt \
35              samples/ed25519-rfc8410.crt \
36              samples/ed25519-ossl-1.crt \
37              samples/ed448-ossl-1.crt
38
39
40 test_crls = samples/ov-test-crl.crl
41
42 test_keys = samples/ov-server.p12  samples/ov-userrev.p12 \
43             samples/ov-serverrev.p12  samples/ov-user.p12
44
45 EXTRA_DIST = $(test_certs)  mkoidtbl.awk \
46              samples/README \
47              samples/detached-sig.cms \
48              samples/rsa-sample1.p7m  samples/rsa-sample1.p7m \
49              samples/rsa-sample1.p7s  samples/rsa-sample1.p7s \
50              samples/ecdh-sample1.p7m samples/ecdh-sample1.p7m.asn \
51              samples/ecdsa-sample1.p7s samples/ecdsa-sample1.p7s.asn
52
53
54 BUILT_SOURCES = oidtranstbl.h
55 CLEANFILES = oidtranstbl.h
56
57 TESTS = cert-basic t-crl-parser t-dnparser t-oid t-reader t-cms-parser \
58         t-der-builder
59
60 AM_CFLAGS = $(GPG_ERROR_CFLAGS) $(COVERAGE_CFLAGS)
61 if HAVE_W32_SYSTEM
62 AM_LDFLAGS = -no-fast-install $(COVERAGE_LDFLAGS)
63 else
64 AM_LDFLAGS = -no-install $(COVERAGE_LDFLAGS)
65 endif
66
67 noinst_HEADERS = t-common.h
68 noinst_PROGRAMS = $(TESTS) t-ocsp
69 LDADD = ../src/libksba.la $(GPG_ERROR_LIBS) @LDADD_FOR_TESTS_KLUDGE@
70
71 t_ocsp_SOURCES = t-ocsp.c sha1.c
72
73 # Build the OID table: Note that the binary includes data from an
74 # another program and we may not be allowed to distribute this.  This
75 # ain't no problem as the programs using this generated data are not
76 # installed and thus not distributed.
77 oidtranstbl.h: Makefile mkoidtbl.awk
78         set -e; f="/dev/null"; \
79         for i in /etc/dumpasn1 /usr/local/bin /usr/local/share /usr/bin \
80                  /usr/share ; do \
81           if test -f $$i/dumpasn1.cfg; then f=$$i/dumpasn1.cfg; break; fi; \
82         done; tr -d '\r' <$$f | $(AWK) -f $(srcdir)/mkoidtbl.awk >$@
83
84 LOG_COMPILER = $(VALGRIND)