chiark / gitweb /
Import gnupg2_2.1.17.orig.tar.bz2
[gnupg2.git] / tests / gpgme / 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/gpgme
40
41 # XXX: Currently, one cannot override automake's 'check' target.  As a
42 # workaround, we avoid defining 'TESTS', thus automake will not emit
43 # the 'check' target.  For extra robustness, we merely define a
44 # dependency on 'xcheck', so this hack should also work even if
45 # automake would emit the 'check' target, as adding dependencies to
46 # targets is okay.
47 check: xcheck
48
49 .PHONY: xcheck
50 xcheck:
51         $(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm \
52           $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(XTESTS)
53
54 EXTRA_DIST = gpgme-defs.scm run-tests.scm setup.scm wrap.scm
55
56 CLEANFILES = *.log
57
58 # We need to depend on a couple of programs so that the tests don't
59 # start before all programs are built.
60 all-local: $(required_pgms)