Blame tests/json/Makefile.am

Packit Service 30b792
# Copyright (C) 2018 Bundesamt für Sicherheit in der Informationstechnik
Packit Service 30b792
#                    Software engineering by Intevation GmbH
Packit Service 30b792
#
Packit Service 30b792
# This file is part of GPGME.
Packit Service 30b792
#
Packit Service 30b792
# GPGME is free software; you can redistribute it and/or modify it
Packit Service 30b792
# under the terms of the GNU Lesser General Public License as
Packit Service 30b792
# published by the Free Software Foundation; either version 2.1 of the
Packit Service 30b792
# License, or (at your option) any later version.
Packit Service 30b792
#
Packit Service 30b792
# GPGME is distributed in the hope that it will be useful, but WITHOUT
Packit Service 30b792
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit Service 30b792
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
Packit Service 30b792
# Public License for more details.
Packit Service 30b792
#
Packit Service 30b792
# You should have received a copy of the GNU Lesser General Public
Packit Service 30b792
# License along with this program; if not, see <https://gnu.org/licenses/>.
Packit Service 30b792
# SPDX-License-Identifier: LGPL-2.1-or-later
Packit Service 30b792
Packit Service 30b792
## Process this file with automake to produce Makefile.in
Packit Service 30b792
Packit Service 30b792
GPGME_JSON=$(abs_builddir)/../../src/gpgme-json
Packit Service 30b792
GPG = gpg
Packit Service 30b792
Packit Service 30b792
GNUPGHOME=$(abs_builddir)
Packit Service 30b792
TESTS_ENVIRONMENT = GNUPGHOME=$(GNUPGHOME) LC_ALL=C GPG_AGENT_INFO= \
Packit Service 30b792
                    top_srcdir=$(top_srcdir) gpgme_json=$(GPGME_JSON)
Packit Service 30b792
Packit Service 30b792
c_tests = t-json
Packit Service 30b792
Packit Service 30b792
TESTS = initial.test $(c_tests) final.test
Packit Service 30b792
Packit Service 30b792
CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
Packit Service 30b792
	gpg-agent.conf pubring.kbx~ S.gpg-agent gpg.conf pubring.gpg~ \
Packit Service 30b792
	random_seed S.gpg-agent .gpg-v21-migrated pubring-stamp \
Packit Service 30b792
	gpg-sample.stamp tofu.db *.conf.gpgconf.bak
Packit Service 30b792
Packit Service 30b792
private_keys = \
Packit Service 30b792
        $(top_srcdir)/tests/gpg/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \
Packit Service 30b792
        $(top_srcdir)/tests/gpg/76F7E2B35832976B50A27A282D9B87E44577EB66 \
Packit Service 30b792
        $(top_srcdir)/tests/gpg/A0747D5F9425E6664F4FFBEED20FBCA79FDED2BD \
Packit Service 30b792
        $(top_srcdir)/tests/gpg/13CBE3758AFE42B5E5E2AE4CED27AFA455E3F87F \
Packit Service 30b792
        $(top_srcdir)/tests/gpg/7A030357C0F253A5BBCD282FFC4E521B37558F5C
Packit Service 30b792
Packit Service 30b792
Packit Service 30b792
EXTRA_DIST = initial.test final.test \
Packit Service 30b792
		t-chunking.in.json t-chunking.out.json \
Packit Service 30b792
		t-config.in.json t-config-opt.in.json \
Packit Service 30b792
		t-config-opt.out.json t-config.out.json \
Packit Service 30b792
		t-createkey.in.json t-createkey.out.json \
Packit Service 30b792
		t-decrypt.in.json t-decrypt.out.json \
Packit Service 30b792
		t-decrypt-verify.in.json t-decrypt-verify.out.json \
Packit Service 30b792
		t-delete.in.json t-delete.out.json \
Packit Service 30b792
		t-encrypt.in.json t-encrypt.out.json \
Packit Service 30b792
		t-encrypt-sign.in.json t-encrypt-sign.out.json \
Packit Service 30b792
		t-export.in.json t-export.out.json \
Packit Service 30b792
		t-export-secret-info.in.json t-export-secret-info.out.json \
Packit Service 30b792
		t-import.in.json t-import.out.json \
Packit Service 30b792
		t-keylist.in.json t-keylist.out.json \
Packit Service 30b792
		t-keylist-secret.in.json t-keylist-secret.out.json \
Packit Service 30b792
		t-sign.in.json t-sign.out.json \
Packit Service 30b792
		t-sig-notations.in.json t-sig-notations.out.json \
Packit Service 30b792
		t-verify.in.json t-verify.out.json \
Packit Service 30b792
		t-version.in.json t-version.out.json
Packit Service 30b792
Packit Service 30b792
BUILT_SOURCES = gpg.conf gpg-agent.conf pubring-stamp \
Packit Service 30b792
           gpg-sample.stamp
Packit Service 30b792
t_json_SOURCES = t-json.c
Packit Service 30b792
AM_LDFLAGS = -no-install
Packit Service 30b792
LDADD = ../../src/libgpgme.la @LDADD_FOR_TESTS_KLUDGE@
Packit Service 30b792
t_json_LDADD = ../../src/cJSON.o -lm ../../src/libgpgme.la @GPG_ERROR_LIBS@ \
Packit Service 30b792
	       @LDADD_FOR_TESTS_KLUDGE@
Packit Service 30b792
Packit Service 30b792
AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@
Packit Service 30b792
Packit Service 30b792
noinst_PROGRAMS = $(c_tests)
Packit Service 30b792
Packit Service 30b792
clean-local:
Packit Service 30b792
	-$(TESTS_ENVIRONMENT) $(top_srcdir)/tests/start-stop-agent --stop
Packit Service 30b792
	-rm -fR private-keys-v1.d
Packit Service 30b792
	-rm -fR openpgp-revocs.d
Packit Service 30b792
Packit Service 30b792
gpg-sample.stamp: $(private_keys)
Packit Service 30b792
	-$(TESTS_ENVIRONMENT) gpgconf --kill all
Packit Service 30b792
	$(MKDIR_P) ./private-keys-v1.d
Packit Service 30b792
	for k in $(private_keys); do \
Packit Service 30b792
          cp $$k private-keys-v1.d/$$(basename $$k).key; \
Packit Service 30b792
        done
Packit Service 30b792
	echo x > ./gpg-sample.stamp
Packit Service 30b792
Packit Service 30b792
pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc gpg-sample.stamp
Packit Service 30b792
	$(TESTS_ENVIRONMENT) $(GPG) --batch --no-permission-warning \
Packit Service 30b792
               --import $(top_srcdir)/tests/gpg/pubdemo.asc
Packit Service 30b792
	-$(TESTS_ENVIRONMENT) $(GPG) --batch --no-permission-warning \
Packit Service 30b792
		--import $(top_srcdir)/tests/gpg/secdemo.asc
Packit Service 30b792
	echo x > ./pubring-stamp
Packit Service 30b792
Packit Service 30b792
gpg.conf:
Packit Service 30b792
# This is required for t-sig-notations.
Packit Service 30b792
	echo no-force-v3-sigs > ./gpg.conf
Packit Service 30b792
Packit Service 30b792
gpg-agent.conf:
Packit Service 30b792
# This is required for gpg2, which does not support command fd for the
Packit Service 30b792
# passphrase.  disable-scdaemon is required so that we don't try using
Packit Service 30b792
# a key from a smartcard reader (error might be: Unusable secret key)
Packit Service 30b792
	echo pinentry-program $(abs_srcdir)/../gpg/pinentry > ./gpg-agent.conf
Packit Service 30b792
	echo disable-scdaemon >> ./gpg-agent.conf
Packit Service 30b792
Packit Service 30b792
Packit Service 30b792
# end-of-file