summaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2017-03-20 10:30:08 +0100
committerJustus Winter <justus@g10code.com>2017-05-11 18:12:37 +0200
commitf4365790daa1d1400c7f0fe73ac9a6d25f0c6d0a (patch)
tree67fadb83cbe030e2a402cd7c356228f38bd19ae0 /Makefile.am
parenttests: Move the makefile parser. (diff)
downloadgnupg2-f4365790daa1d1400c7f0fe73ac9a6d25f0c6d0a.tar.xz
gnupg2-f4365790daa1d1400c7f0fe73ac9a6d25f0c6d0a.zip
tests: Make it possible to run all tests using our infrastructure.
* Makefile.am (TESTS_ENVIRONMENT): New variable. (check-all): New phony target to run all tests. * tests/gpgme/gpgme-defs.scm (have-gpgme?): New function that tests whether the GPGME test suite is available instead of exiting the process. * tests/gpgscm/init.scm (export): New macro. * tests/gpgscm/tests.scm (run-tests): New function. (load-tests): Likewise. * tests/gpgme/run-tests.scm: Simplify and move the parsing of the list of tests to 'all-tests.scm'. * tests/gpgsm/run-tests.scm: Likewise. * tests/migrations/run-tests.scm: Likewise. * tests/openpgp/run-tests.scm: Likewise. * tests/gpgme/Makefile.am: To select the tests to run, use the variable 'TESTS'. This harmonizes the interface with the automake test suite. * tests/gpgsm/Makefile.am: Likewise. * tests/migrations/Makefile.am: Likewise. * tests/openpgp/Makefile.am: Likewise. * tests/openpgp/README: Likewise. * agent/all-tests.scm: New file. * common/all-tests.scm: Likewise. * g10/all-tests.scm: Likewise. * g13/all-tests.scm: Likewise. * tests/gpgme/all-tests.scm: Likewise. * tests/gpgsm/all-tests.scm: Likewise. * tests/migrations/all-tests.scm: Likewise. * tests/openpgp/all-tests.scm: Likewise. * tests/run-tests.scm: Likewise. -- This change allows us to run all tests in parallel and write one XML report capturing the results of every test. It also lays the foundation to parametrize test suites. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 7d023c1af..e1f9a2748 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -141,3 +141,17 @@ gen-ChangeLog:
stowinstall:
$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/gnupg
+
+TESTS_ENVIRONMENT = \
+ LC_ALL=C \
+ EXEEXT=$(EXEEXT) \
+ PATH=$(abs_top_builddir)/tests/gpgscm:$(PATH) \
+ abs_top_srcdir=$(abs_top_srcdir) \
+ objdir=$(abs_top_builddir) \
+ GPGSCM_PATH=$(abs_top_srcdir)/tests/gpgscm
+
+.PHONY: check-all
+check-all:
+ $(TESTS_ENVIRONMENT) \
+ $(abs_top_builddir)/tests/gpgscm/gpgscm \
+ $(abs_srcdir)/tests/run-tests.scm $(TESTFLAGS) $(TESTS)