diff options
author | Justus Winter <[email protected]> | 2016-09-14 08:22:07 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-09-14 10:18:15 +0000 |
commit | 24b4162d908b48a92660020be0b776c2874fb05a (patch) | |
tree | fcdf0bd5107b5c268f10a9bc0ffa5cf1e616297a /lang/python/tests/Makefile.am | |
parent | python: Import from __future__ to align behavior of Python 2.7. (diff) | |
download | gpgme-24b4162d908b48a92660020be0b776c2874fb05a.tar.gz gpgme-24b4162d908b48a92660020be0b776c2874fb05a.zip |
python: Build for both Python2 and Python3.
* NEWS: Update.
* configure.ac: Check for multiple Python versions.
* lang/python/Makefile.am: Build and install for both Python versions.
* lang/python/tests/Makefile.am: Test both versions.
* lang/python/tests/run-tests.py: New test runner.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | lang/python/tests/Makefile.am | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am index 83c4d8e0..6a315d7c 100644 --- a/lang/python/tests/Makefile.am +++ b/lang/python/tests/Makefile.am @@ -26,8 +26,8 @@ test_srcdir = $(top_srcdir)/tests/gpg TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) \ LC_ALL=C GPG_AGENT_INFO= \ top_srcdir=$(top_srcdir) \ - LD_LIBRARY_PATH="../../../src/.libs:$(LD_LIBRARY_PATH)" \ - PYTHONPATH=`echo $(abs_builddir)/../build/lib.*` + srcdir=$(srcdir) \ + LD_LIBRARY_PATH="../../../src/.libs:$(LD_LIBRARY_PATH)" py_tests = t-wrapper.py \ t-callbacks.py \ @@ -52,8 +52,23 @@ py_tests = t-wrapper.py \ t-idiomatic.py \ t-protocol-assuan.py -TESTS = initial.py $(py_tests) final.py -EXTRA_DIST = support.py $(TESTS) encrypt-only.asc sign-only.asc +XTESTS = initial.py $(py_tests) final.py +EXTRA_DIST = support.py $(XTESTS) encrypt-only.asc sign-only.asc \ + run-tests.py + +# XXX: Currently, one cannot override automake's 'check' target. As a +# workaround, we avoid defining 'TESTS', thus automake will not emit +# the 'check' target. For extra robustness, we merely define a +# dependency on 'xcheck', so this hack should also work even if +# automake would emit the 'check' target, as adding dependencies to +# targets is okay. +check: xcheck + +.PHONY: xcheck +xcheck: + $(TESTS_ENVIRONMENT) $(PYTHON) $(srcdir)/run-tests.py \ + --interpreters="$(PYTHONS)" --srcdir=$(srcdir) $(TESTFLAGS) \ + $(XTESTS) CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \ gpg-agent.conf pubring.kbx~ gpg.conf pubring.gpg~ \ |