Clean up the tests correctly.
[gpgme.git] / tests / gpg / Makefile.am
1 # Copyright (C) 2000 Werner Koch (dd9jn)
2 # Copyright (C) 2001, 2004, 2005, 2009 g10 Code GmbH
3
4 # This file is part of GPGME.
5
6 # GPGME is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of the
9 # License, or (at your option) any later version.
10
11 # GPGME is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
14 # Public License for more details.
15
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19
20 ## Process this file with automake to produce Makefile.in
21
22 GPG = @GPG@
23
24 TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO=
25
26 # The keylist tests must come after the import and the edit test.
27 noinst_HEADERS = t-support.h
28
29 if HAVE_W32_SYSTEM
30 tests_unix =
31 else
32 tests_unix = t-eventloop t-thread1
33 endif
34
35 TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers         \
36         t-decrypt t-verify t-decrypt-verify t-sig-notation t-export     \
37         t-import t-trustlist t-edit t-keylist t-keylist-sig t-wait      \
38         t-encrypt-large t-file-name t-gpgconf $(tests_unix)
39
40 CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
41         gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \
42         random_seed
43
44 EXTRA_DIST = pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \
45         geheim.txt pubkey-1.asc seckey-1.asc pinentry
46
47 INCLUDES = -I$(top_builddir)/src
48
49 AM_CPPFLAGS = @GPG_ERROR_CFLAGS@
50 LDADD = ../../src/libgpgme.la
51 t_thread1_LDADD = ../../src/libgpgme-pthread.la
52
53 # We don't run t-genkey in the test suite, because it takes too long
54 noinst_PROGRAMS = $(TESTS) t-genkey
55
56 clean-local:
57         -gpg-connect-agent KILLAGENT /bye
58         -rm -fR private-keys-v1.d
59
60 all-local: ./gpg.conf ./gpg-agent.conf ./pubring.gpg 
61
62 export GNUPGHOME := $(abs_builddir)
63
64 export GPG_AGENT_INFO := 
65
66 ./pubring.gpg: $(srcdir)/pubdemo.asc
67         -$(GPG) --no-permission-warning \
68                 --import $(srcdir)/pubdemo.asc
69         -$(GPG) --no-permission-warning \
70                 --import $(srcdir)/secdemo.asc
71
72 ./gpg.conf:
73 # This is required for t-sig-notations.
74         echo no-force-v3-sigs > ./gpg.conf
75
76 ./gpg-agent.conf:
77 # This is required for gpg2, which does not support command fd.
78         echo pinentry-program $(abs_srcdir)/pinentry > ./gpg-agent.conf