Some tweaks to the agent startup.
[gnupg.git] / tests / openpgp / Makefile.am
1 # Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
2 #
3 # This file is part of GnuPG.
4 #
5 # GnuPG is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
9
10 # GnuPG is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, see <http://www.gnu.org/licenses/>.
17 # Process this file with automake to create Makefile.in
18
19 GPG_IMPORT = ../../g10/gpg2 --homedir $(abs_builddir) \
20               --quiet --yes --no-permission-warning --import
21
22 # Programs required before we can run these tests.
23 required_pgms = ../../g10/gpg2 ../../agent/gpg-agent \
24                 ../../tools/gpg-connect-agent
25
26 TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= LC_ALL=C
27
28 TESTS = version.test mds.test \
29         decrypt.test decrypt-dsa.test \
30         sigs.test sigs-dsa.test \
31         encrypt.test encrypt-dsa.test  \
32         seat.test clearsig.test encryptp.test detach.test \
33         armsigs.test armencrypt.test armencryptp.test \
34         signencrypt.test signencrypt-dsa.test \
35         armsignencrypt.test armdetach.test \
36         armdetachm.test detachm.test genkey1024.test \
37         conventional.test conventional-mdc.test \
38         multisig.test verify.test armor.test \
39         import.test
40
41
42 TEST_FILES = pubring.asc secring.asc plain-1o.asc plain-2o.asc plain-3o.asc \
43              plain-1.asc plain-2.asc plain-3.asc plain-1-pgp.asc \
44              pubring.pkr.asc secring.skr.asc secdemo.asc pubdemo.asc \
45              gpg.conf.tmpl gpg-agent.conf.tmpl \
46              bug537-test.data.asc bug894-test.asc \
47              bug1223-good.asc bug1223-bogus.asc
48
49 DATA_FILES = data-500 data-9000 data-32000 data-80000 plain-large
50
51 EXTRA_DIST = defs.inc $(TESTS) $(TEST_FILES) \
52              mkdemodirs signdemokey
53
54 CLEANFILES = prepared.stamp x y yy z out err  $(DATA_FILES) \
55              plain-1 plain-2 plain-3 trustdb.gpg *.lock .\#lk* \
56              *.test.log gpg_dearmor gpg.conf gpg-agent.conf S.gpg-agent \
57              pubring.gpg secring.gpg pubring.pkr secring.skr
58
59 DISTCLEANFILES = pubring.gpg~ random_seed
60
61
62 all-local: prepared.stamp
63
64 distclean-local:
65         $(srcdir)/mkdemodirs --clean
66
67 prepared.stamp: ./pubring.gpg ./secring.gpg ./plain-1 ./plain-2 ./plain-3 \
68                 ./pubring.pkr ./secring.skr ./gpg_dearmor $(DATA_FILES)
69          $(GPG_IMPORT) $(srcdir)/pubdemo.asc     
70          echo timestamp >./prepared.stamp
71
72 # We need to depend on a couple of programs so that the tests don't
73 # start before all programs are built.
74 ./gpg_dearmor:  $(required_pgms)
75         echo '#!/bin/sh' >./gpg_dearmor
76         echo "../../g10/gpg2 --no-options --no-greeting \
77              --no-secmem-warning --batch --dearmor" >>./gpg_dearmor
78         chmod 755 ./gpg_dearmor
79
80 ./pubring.gpg: $(srcdir)/pubring.asc $(srcdir)/pubdemo.asc ./gpg_dearmor
81         ./gpg_dearmor > ./pubring.gpg < $(srcdir)/pubring.asc
82
83 ./secring.gpg: $(srcdir)/secring.asc ./gpg_dearmor
84         ./gpg_dearmor > ./secring.gpg < $(srcdir)/secring.asc
85
86 ./pubring.pkr: $(srcdir)/pubring.pkr.asc ./gpg_dearmor
87         ./gpg_dearmor > ./pubring.pkr < $(srcdir)/pubring.pkr.asc
88
89 ./secring.skr: $(srcdir)/secring.skr.asc ./gpg_dearmor
90         ./gpg_dearmor > ./secring.skr < $(srcdir)/secring.skr.asc
91
92 ./plain-1: $(srcdir)/plain-1o.asc ./gpg_dearmor
93         ./gpg_dearmor > ./plain-1 < $(srcdir)/plain-1o.asc
94
95 ./plain-2: $(srcdir)/plain-2o.asc ./gpg_dearmor
96         ./gpg_dearmor > ./plain-2 < $(srcdir)/plain-2o.asc
97
98 ./plain-3: $(srcdir)/plain-3o.asc ./gpg_dearmor
99         ./gpg_dearmor > ./plain-3 < $(srcdir)/plain-3o.asc
100
101
102 data-500:
103         ../../tools/mk-tdata   500  >data-500
104 data-9000:
105         ../../tools/mk-tdata  9000  >data-9000
106 data-32000:
107         ../../tools/mk-tdata 32000  >data-32000
108 data-80000:
109         ../../tools/mk-tdata 80000  >data-80000
110 plain-large:
111         cat $(srcdir)/../../doc/HACKING \
112             $(srcdir)/../../doc/DETAILS \
113             $(srcdir)/../../doc/gpg.texi >plain-large
114
115 # To speed up key generation we create a dummy random seed file
116 random_seed:
117         ../../tools/mk-tdata 600
118