aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-05-10 13:49:54 +0000
committerJustus Winter <[email protected]>2017-05-10 13:49:54 +0000
commit15adff073bb89dc032d8342cfbbdad2850943f52 (patch)
tree44e6ec951459d8c398e5892c829520df46c1503f
parentqt: Stop agent on clean. (diff)
downloadgpgme-15adff073bb89dc032d8342cfbbdad2850943f52.tar.gz
gpgme-15adff073bb89dc032d8342cfbbdad2850943f52.zip
tests: Harmonize test suites.
* lang/python/tests/Makefile.am: Create test environment as part of 'make all'. * tests/gpg/Makefile.am: Make sure the private keystore is created first. * tests/gpgsm/Makefile.am: Create test environment as part of 'make all'. Make sure the private keystore is created first. Signed-off-by: Justus Winter <[email protected]>
-rw-r--r--lang/python/tests/Makefile.am5
-rw-r--r--tests/gpg/Makefile.am2
-rw-r--r--tests/gpgsm/Makefile.am11
3 files changed, 13 insertions, 5 deletions
diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am
index 9c19a13e..b62b5247 100644
--- a/lang/python/tests/Makefile.am
+++ b/lang/python/tests/Makefile.am
@@ -71,7 +71,7 @@ check: xcheck
.PHONY: xcheck
-xcheck: ./pubring-stamp
+xcheck:
$(TESTS_ENVIRONMENT) $(PYTHON) $(srcdir)/run-tests.py \
--interpreters="$(PYTHONS)" --srcdir=$(srcdir) $(TESTFLAGS) \
$(XTESTS)
@@ -93,6 +93,9 @@ clean-local:
-rm -fR -- private-keys-v1.d openpgp-revocs.d S.gpg-agent sshcontrol
+BUILT_SOURCES = gpg.conf gpg-agent.conf pubring-stamp \
+ private-keys-v1.d/gpg-sample.stamp
+
./private-keys-v1.d/gpg-sample.stamp: $(private_keys)
$(MKDIR_P) ./private-keys-v1.d
for k in $(private_keys); do \
diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am
index 1d9a6dfe..ed1323b4 100644
--- a/tests/gpg/Makefile.am
+++ b/tests/gpg/Makefile.am
@@ -95,7 +95,7 @@ export GPG_AGENT_INFO :=
done
echo x > ./private-keys-v1.d/gpg-sample.stamp
-./pubring-stamp: $(srcdir)/pubdemo.asc
+./pubring-stamp: $(srcdir)/pubdemo.asc ./private-keys-v1.d/gpg-sample.stamp
$(GPG) --batch --no-permission-warning \
--import $(srcdir)/pubdemo.asc
-$(GPG) --batch --no-permission-warning \
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am
index 46d6a9bc..76e49383 100644
--- a/tests/gpgsm/Makefile.am
+++ b/tests/gpgsm/Makefile.am
@@ -44,7 +44,7 @@ noinst_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt
key_id = 32100C27173EF6E9C4E9A25D3D69F86D37A4F939
-CLEANFILES = pubring.kbx pubring.kbx~ gpgsm.conf trustlist.txt \
+CLEANFILES = pubring-stamp pubring.kbx pubring.kbx~ gpgsm.conf trustlist.txt \
random_seed S.gpg-agent
clean-local:
@@ -62,16 +62,21 @@ export GNUPGHOME := $(abs_builddir)
export GPG_AGENT_INFO :=
-./pubring.kbx: $(srcdir)/cert_g10code_test1.der
+BUILT_SOURCES = gpgsm.conf trustlist.txt pubring-stamp \
+ private-keys-v1.d/gpg-sample.stamp
+
+./pubring-stamp: $(srcdir)/cert_g10code_test1.der ./private-keys-v1.d/gpg-sample.stamp
$(GPGSM) --import $(srcdir)/cert_g10code_test1.der
+ touch pubring-stamp
./gpgsm.conf:
echo disable-crl-checks > ./gpgsm.conf
echo faked-system-time 1008241200 >> ./gpgsm.conf
-./private-keys-v1.d/$(key_id).key: $(srcdir)/$(key_id)
+./private-keys-v1.d/gpg-sample.stamp: $(srcdir)/$(key_id)
$(MKDIR_P) ./private-keys-v1.d
cp $(srcdir)/$(key_id) private-keys-v1.d/$(key_id).key
+ echo x > ./private-keys-v1.d/gpg-sample.stamp
./trustlist.txt:
echo $(key_id) > ./trustlist.txt