aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/tests
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-09-20 17:58:00 +0000
committerWerner Koch <[email protected]>2016-09-20 17:58:00 +0000
commit0763357e39d140b068ee9838a5da08be75426d9f (patch)
tree223b1eab08c5c122c298e4c6fb2352bfbff5039d /lang/python/tests
parenttests: Use --batch for gpg import. (diff)
downloadgpgme-0763357e39d140b068ee9838a5da08be75426d9f.tar.gz
gpgme-0763357e39d140b068ee9838a5da08be75426d9f.zip
tests: Make "make -j distcheck" work in Python.
* lang/python/Makefile.am (SUBDIRS): Make current dir fist. * lang/python/tests/Makefile.am (xcheck): Depend on pubring-stamp. (CLEANFILES): Remove private-keys-v1.d/gpg-sample.stamp. (check-local): Remove. (initial.py): Remove dependency. (./pubring-stamp): Depend on conf files and the private-keys-v1.d/gpg-sample.stamp file. Also replace use of basename. -- This addresses the problem that two rules might run the private keys copy rule and due to the files being chmod -w during make discheck the second process running that rule's cp would get a permission error. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'lang/python/tests')
-rw-r--r--lang/python/tests/Makefile.am18
1 files changed, 8 insertions, 10 deletions
diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am
index 0538e54f..aa88bdcb 100644
--- a/lang/python/tests/Makefile.am
+++ b/lang/python/tests/Makefile.am
@@ -65,14 +65,16 @@ EXTRA_DIST = support.py $(XTESTS) encrypt-only.asc sign-only.asc \
check: xcheck
.PHONY: xcheck
-xcheck:
+
+xcheck: ./pubring-stamp
$(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~ \
- random_seed .gpg-v21-migrated pubring-stamp
+ random_seed .gpg-v21-migrated \
+ pubring-stamp private-keys-v1.d/gpg-sample.stamp
private_keys = \
$(test_srcdir)/13CD0F3BDF24BE53FE192D62F18737256FF6E4FD \
@@ -85,21 +87,17 @@ clean-local:
-$(top_srcdir)/tests/start-stop-agent --stop
-rm -fR -- private-keys-v1.d openpgp-revocs.d S.gpg-agent sshcontrol
-check-local: ./gpg.conf ./gpg-agent.conf ./pubring-stamp \
- ./private-keys-v1.d/gpg-sample.stamp
-
-# To guarantee that check-local is run before any tests we
-# add this dependency:
-initial.py: check-local
./private-keys-v1.d/gpg-sample.stamp: $(private_keys)
test -d ./private-keys-v1.d || mkdir ./private-keys-v1.d
for k in $(private_keys); do \
- cp $$k private-keys-v1.d/`basename $$k`.key; \
+ cp $$k private-keys-v1.d/$${k#$(test_srcdir)/}.key; \
done
echo x > ./private-keys-v1.d/gpg-sample.stamp
-./pubring-stamp: $(test_srcdir)/pubdemo.asc
+./pubring-stamp: $(test_srcdir)/pubdemo.asc \
+ ./gpg.conf ./gpg-agent.conf \
+ ./private-keys-v1.d/gpg-sample.stamp
$(GPG) --batch --no-permission-warning \
--import $(test_srcdir)/pubdemo.asc
-$(GPG) --batch --no-permission-warning \