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
31 TESTS_ENVIRONMENT = LC_ALL=C \
33 PATH="../gpgscm:$(PATH)" \
34 abs_top_srcdir=$(abs_top_srcdir) \
35 objdir=$(abs_top_builddir) \
36 GNUPG_BUILD_ROOT="$(abs_top_builddir)" \
37 GNUPG_IN_TEST_SUITE=fact \
38 GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
40 # XXX: Currently, one cannot override automake's 'check' target. As a
41 # workaround, we avoid defining 'TESTS', thus automake will not emit
42 # the 'check' target. For extra robustness, we merely define a
43 # dependency on 'xcheck', so this hack should also work even if
44 # automake would emit the 'check' target, as adding dependencies to
50 $(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm$(EXEEXT) \
51 $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(TESTS)
53 EXTRA_DIST = gpgme-defs.scm run-tests.scm setup.scm wrap.scm all-tests.scm
55 CLEANFILES = *.log report.xml
57 # We need to depend on a couple of programs so that the tests don't
58 # start before all programs are built.
59 all-local: $(required_pgms)