diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-03-09 01:38:26 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-03-18 17:20:52 +0100 |
commit | f68929ac611fdda19c1ee413effc59d33aa5ef97 (patch) | |
tree | 0f570af971c9306d11e678ca097f57e9a8ac9590 | |
parent | caa99a82bb91771053cae8d86da6ca2883357540 (diff) |
gpg4libre: fix failing gpg test due to over-long filenames
With long workdir path, gpg sometimes fails with 'gpg: can't connect
to the agent: File name too long' error.
WK recommends to create preferred socket dir under /run/user, needs
prepping though via gpgconf.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=84720
Change-Id: I2edb27758b2d4581d54eabf549dcdfed0106dba4
Reviewed-on: https://gerrit.libreoffice.org/50978
Tested-by: Rene Engelhard <rene@debian.org>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r-- | xmlsecurity/CppunitTest_xmlsecurity_signing.mk | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk index c382e3b09e75..747ffdd7041b 100644 --- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk +++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk @@ -52,11 +52,21 @@ ifeq ($(ENABLE_PDFIMPORT),TRUE) $(eval $(call gb_CppunitTest_use_executable,xmlsecurity_signing,xpdfimport)) endif -# reset the LD_LIBRARY_PATH for spawned GPG processes +# various hacks to make unit test work on Linux more often ifeq ($(OS),LINUX) +# reset the LD_LIBRARY_PATH for spawned GPG processes $(call gb_CppunitTest_get_target,xmlsecurity_signing): \ EXTRA_ENV_VARS := \ LIBO_LD_PATH=$$LD_LIBRARY_PATH + +# create socket dir below /run/user/ instead of in workdir +.PHONY : gb_CppunitTest_run_gpgconf +gb_CppunitTest_run_gpgconf: + GNUPGHOME=$(WORKDIR)/CppunitTest/xmlsecurity_signing.test.user \ + gpgconf --create-socketdir 2>/dev/null || true + +$(call gb_CppunitTest_get_target,xmlsecurity_signing): \ + gb_CppunitTest_run_gpgconf endif # vim: set noet sw=4 ts=4: |