chiark / gitweb /
gpg: Fix searching for mail addresses in keyrings.
[gnupg2.git] / tests / gpgsm / Makefile.am
1 # Makefile.am - For tests/gpgme
2 # Copyright (C) 2016 g10 Code GmbH
3 #
4 # This file is part of GnuPG.
5 #
6 # GnuPG 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 # GnuPG 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 <https://www.gnu.org/licenses/>.
18 # Process this file with automake to create Makefile.in
19
20
21 # Programs required before we can run these tests.
22 required_pgms = ../../g10/gpg$(EXEEXT) ../../agent/gpg-agent$(EXEEXT) \
23                 ../../tools/gpg-connect-agent$(EXEEXT) \
24                 ../gpgscm/gpgscm$(EXEEXT)
25
26 AM_CPPFLAGS = -I$(top_srcdir)/common
27 include $(top_srcdir)/am/cmacros.am
28
29 AM_CFLAGS =
30
31 TMP ?= /tmp
32
33 TESTS_ENVIRONMENT = LC_ALL=C \
34         EXEEXT=$(EXEEXT) \
35         PATH=../gpgscm:$(PATH) \
36         TMP=$(TMP) \
37         srcdir=$(abs_srcdir) \
38         objdir=$(abs_top_builddir) \
39         GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm:$(abs_top_srcdir)/tests/openpgp:$(abs_top_srcdir)/tests/gpgsm
40
41 XTESTS = \
42         import.scm \
43         encrypt.scm \
44         verify.scm \
45         decrypt.scm \
46         sign.scm \
47         export.scm
48
49 # XXX: Currently, one cannot override automake's 'check' target.  As a
50 # workaround, we avoid defining 'TESTS', thus automake will not emit
51 # the 'check' target.  For extra robustness, we merely define a
52 # dependency on 'xcheck', so this hack should also work even if
53 # automake would emit the 'check' target, as adding dependencies to
54 # targets is okay.
55 check: xcheck
56
57 .PHONY: xcheck
58 xcheck:
59         $(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm \
60           $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(XTESTS)
61
62 KEYS =  32100C27173EF6E9C4E9A25D3D69F86D37A4F939
63 CERTS = cert_g10code_test1.der \
64         cert_dfn_pca01.der \
65         cert_dfn_pca15.der
66 TEST_FILES = plain-1.cms.asc \
67         plain-2.cms.asc \
68         plain-3.cms.asc \
69         plain-large.cms.asc
70
71 EXTRA_DIST = $(XTESTS) $(KEYS) $(CERTS) $(TEST_FILES) \
72         gpgsm-defs.scm run-tests.scm setup.scm
73
74 CLEANFILES = *.log
75
76 # We need to depend on a couple of programs so that the tests don't
77 # start before all programs are built.
78 all-local: $(required_pgms)