json: Fix t-decrypt-verify.out for GnuPG >= 2.3.
[gpgme.git] / lang / qt / tests / Makefile.am
1 # Makefile.am - Makefile for GPGME Qt tests.
2 # Copyright (C) 2016 Bundesamt für Sicherheit in der Informationstechnik
3 # Software engineering by Intevation GmbH
4 #
5 # This file is part of GPGME.
6 #
7 # GPGME is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation; either version 2.1 of the
10 # License, or (at your option) any later version.
11 #
12 # GPGME is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
15 # Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this program; if not, see <https://www.gnu.org/licenses/>.
19
20 ## Process this file with automake to produce Makefile.in
21
22 GPG = gpg
23
24 GNUPGHOME=$(abs_builddir)
25 TESTS_ENVIRONMENT = GNUPGHOME=$(GNUPGHOME)
26
27 EXTRA_DIST = initial.test
28
29 TESTS = initial.test t-keylist t-keylocate t-ownertrust t-tofuinfo \
30         t-encrypt t-verify t-various t-config
31
32 moc_files = t-keylist.moc t-keylocate.moc t-ownertrust.moc t-tofuinfo.moc \
33             t-encrypt.moc t-support.hmoc t-wkspublish.moc t-verify.moc \
34             t-various.moc t-config.moc
35
36 AM_LDFLAGS = -no-install
37
38 LDADD = ../../cpp/src/libgpgmepp.la ../src/libqgpgme.la \
39         ../../../src/libgpgme.la @GPGME_QT_LIBS@ @GPG_ERROR_LIBS@ \
40         @GPGME_QTTEST_LIBS@ @LDADD_FOR_TESTS_KLUDGE@ -lstdc++
41
42 AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
43               @GPG_ERROR_CFLAGS@ @GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ \
44               @LIBASSUAN_CFLAGS@ @GPGME_QTTEST_CFLAGS@ -DBUILDING_QGPGME \
45               -I$(top_srcdir)/lang/qt/src \
46               -DTOP_SRCDIR="$(top_srcdir)"
47
48 support_src = t-support.h t-support.cpp
49
50 t_keylist_SOURCES = t-keylist.cpp $(support_src)
51 t_keylocate_SOURCES = t-keylocate.cpp $(support_src)
52 t_ownertrust_SOURCES = t-ownertrust.cpp $(support_src)
53 t_tofuinfo_SOURCES = t-tofuinfo.cpp $(support_src)
54 t_encrypt_SOURCES = t-encrypt.cpp $(support_src)
55 t_wkspublish_SOURCES = t-wkspublish.cpp $(support_src)
56 t_verify_SOURCES = t-verify.cpp $(support_src)
57 t_various_SOURCES = t-various.cpp $(support_src)
58 t_config_SOURCES = t-config.cpp $(support_src)
59 run_keyformailboxjob_SOURCES = run-keyformailboxjob.cpp
60
61 nodist_t_keylist_SOURCES = $(moc_files)
62
63 BUILT_SOURCES = $(moc_files) pubring-stamp
64
65 noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \
66     run-keyformailboxjob t-wkspublish t-verify t-various t-config
67
68 CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
69         gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \
70         random_seed S.gpg-agent .gpg-v21-migrated pubring-stamp $(moc_files) \
71         gpg.conf tofu.db reader_0.status reader_1.status
72
73 clean-local:
74         -$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop
75         -rm -fR  private-keys-v1.d crls.d
76
77 pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc \
78                      $(top_srcdir)/tests/gpg/secdemo.asc
79         -$(TESTS_ENVIRONMENT) gpgconf --kill all
80         echo "ignore-invalid-option allow-loopback-pinentry" > $(abs_builddir)/gpg-agent.conf
81         echo "allow-loopback-pinentry" >> gpg-agent.conf
82         echo "ignore-invalid-option pinentry-mode" > gpg.conf
83         echo "pinentry-mode loopback" >> gpg.conf
84         $(TESTS_ENVIRONMENT) $(GPG) --no-permission-warning \
85            --import $(top_srcdir)/tests/gpg/pubdemo.asc
86         $(TESTS_ENVIRONMENT) $(GPG) --no-permission-warning \
87                    --passphrase "abc" \
88            --import $(top_srcdir)/tests/gpg/secdemo.asc
89         touch pubring-stamp
90
91 .cpp.moc:
92         $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@
93
94 .h.hmoc:
95         $(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@