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 <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-05-10 15:49:54 +02:00
parent 093b5497b7
commit 15adff073b
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020
3 changed files with 13 additions and 5 deletions

View File

@ -71,7 +71,7 @@ check: xcheck
.PHONY: xcheck .PHONY: xcheck
xcheck: ./pubring-stamp xcheck:
$(TESTS_ENVIRONMENT) $(PYTHON) $(srcdir)/run-tests.py \ $(TESTS_ENVIRONMENT) $(PYTHON) $(srcdir)/run-tests.py \
--interpreters="$(PYTHONS)" --srcdir=$(srcdir) $(TESTFLAGS) \ --interpreters="$(PYTHONS)" --srcdir=$(srcdir) $(TESTFLAGS) \
$(XTESTS) $(XTESTS)
@ -93,6 +93,9 @@ clean-local:
-rm -fR -- private-keys-v1.d openpgp-revocs.d S.gpg-agent sshcontrol -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) ./private-keys-v1.d/gpg-sample.stamp: $(private_keys)
$(MKDIR_P) ./private-keys-v1.d $(MKDIR_P) ./private-keys-v1.d
for k in $(private_keys); do \ for k in $(private_keys); do \

View File

@ -95,7 +95,7 @@ export GPG_AGENT_INFO :=
done done
echo x > ./private-keys-v1.d/gpg-sample.stamp 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 \ $(GPG) --batch --no-permission-warning \
--import $(srcdir)/pubdemo.asc --import $(srcdir)/pubdemo.asc
-$(GPG) --batch --no-permission-warning \ -$(GPG) --batch --no-permission-warning \

View File

@ -44,7 +44,7 @@ noinst_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt
key_id = 32100C27173EF6E9C4E9A25D3D69F86D37A4F939 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 random_seed S.gpg-agent
clean-local: clean-local:
@ -62,16 +62,21 @@ export GNUPGHOME := $(abs_builddir)
export GPG_AGENT_INFO := 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 $(GPGSM) --import $(srcdir)/cert_g10code_test1.der
touch pubring-stamp
./gpgsm.conf: ./gpgsm.conf:
echo disable-crl-checks > ./gpgsm.conf echo disable-crl-checks > ./gpgsm.conf
echo faked-system-time 1008241200 >> ./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 $(MKDIR_P) ./private-keys-v1.d
cp $(srcdir)/$(key_id) private-keys-v1.d/$(key_id).key cp $(srcdir)/$(key_id) private-keys-v1.d/$(key_id).key
echo x > ./private-keys-v1.d/gpg-sample.stamp
./trustlist.txt: ./trustlist.txt:
echo $(key_id) > ./trustlist.txt echo $(key_id) > ./trustlist.txt