1 # Makefile.am - For tests/gpgme
2 # Copyright (C) 2016 g10 Code GmbH
4 # This file is part of GnuPG.
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.
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.
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
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)
26 AM_CPPFLAGS = -I$(top_srcdir)/common
27 include $(top_srcdir)/am/cmacros.am
33 TESTS_ENVIRONMENT = LC_ALL=C \
35 PATH=../gpgscm:$(PATH) \
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
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
51 $(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm \
52 $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(XTESTS)
54 EXTRA_DIST = gpgme-defs.scm run-tests.scm setup.scm wrap.scm
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)