gpg-agent killings doesn't hurt, if we don't try to move .gnupg in the meantime.... gave up with skeleton copying, and re-create home and rings for each unittest... heavily bloated, but works
authorEdouard Tisserant <edouard@pep-project.org>
Thu, 20 Jul 2017 10:41:47 -0400
changeset 1934c59a9b6e9f40
parent 1932 1bbe9e6435b7
child 1935 adc342c265ee
gpg-agent killings doesn't hurt, if we don't try to move .gnupg in the meantime.... gave up with skeleton copying, and re-create home and rings for each unittest... heavily bloated, but works
test/Makefile
     1.1 --- a/test/Makefile	Thu Jul 20 15:09:34 2017 +0200
     1.2 +++ b/test/Makefile	Thu Jul 20 10:41:47 2017 -0400
     1.3 @@ -36,8 +36,7 @@
     1.4  
     1.5  unexport GNUPGHOME;
     1.6  TEST_HOME=$(HERE)/test_home
     1.7 -TEST_HOME_SKEL=$(TEST_HOME)_skel
     1.8 -TEST_GNUPGHOME_SKEL=$(TEST_HOME)_skel/.gnupg
     1.9 +TEST_GNUPGHOME=$(TEST_HOME)/.gnupg
    1.10  
    1.11  ifeq ($(shell which gpg2), )
    1.12      GPG_CMD = gpg
    1.13 @@ -58,29 +57,18 @@
    1.14  define killgpg =
    1.15  	gpgconf --kill gpg-agent
    1.16  	HOME=$(TEST_HOME) gpgconf --kill gpg-agent
    1.17 -	HOME=$(TEST_HOME_SKEL) gpgconf --kill gpg-agent
    1.18  endef
    1.19 -ifeq ("$(OPENPGP)","NETPGP")
    1.20 -    killgpg_if_using_it =
    1.21 -else
    1.22 -    killgpg_if_using_it = $(killgpg)
    1.23 -endif
    1.24  
    1.25 -test_home_skel:
    1.26 +test_home_: 
    1.27  	$(killgpg)
    1.28 -	mkdir -p test_home_skel
    1.29 -	mkdir -p $(TEST_GNUPGHOME_SKEL)/private-keys-v1.d
    1.30 -	$(GPG_CMD) --import --batch --homedir $(TEST_GNUPGHOME_SKEL) 0x*.asc *_sec.asc
    1.31 +	rm -rf $(TEST_HOME)
    1.32 +	mkdir -p $(TEST_GNUPGHOME)/private-keys-v1.d
    1.33 +	$(GPG_CMD) --import --batch --homedir $(TEST_GNUPGHOME) 0x*.asc *_sec.asc
    1.34  	$(killgpg)
    1.35  
    1.36 -test_home_: test_home_skel
    1.37 -	$(killgpg_if_using_it)
    1.38 -	rm -rf test_home
    1.39 -	cp -a test_home_skel test_home
    1.40 -
    1.41  clean:
    1.42  	rm -f *.o $(TARGET) *.a *~ $(UNIT_TESTS) pep_Dokument_Titel.pdf msg4.asc
    1.43 -	rm -Rf *.dSYM test_home test_home_skel pubring.gpg secring.gpg random_seed *.conf trustdb.gpg
    1.44 +	rm -Rf *.dSYM $(TEST_HOME) pubring.gpg secring.gpg random_seed *.conf trustdb.gpg
    1.45  
    1.46  test: pEpEngineTest test_home_
    1.47  	$(TEST_CMD_PFX) ./pEpEngineTest