1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

tests: Fix setup of ephemeral home directories.

* tests/openpgp/defs.scm (with-ephemeral-home-directory): Create
configuration files when we enter the context.
* tests/openpgp/setup.scm: Do not use an ephemeral home directory.
Tests should always use the cwd.
* tests/gpgsm/setup.scm: Likewise.
* tests/gpgsm/export.scm: Add explicit constructor function.
* tests/openpgp/decrypt-session-key.scm: Likewise.
* tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
--

Previously, ephemeral homedirectories lacked a configuration, hence
GnuPG tried to start backend daemons using their installed locations.
Fix this by explicitly creating a suitable configuration.

GnuPG-bug-id: 3047
Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-04-04 14:32:04 +02:00
parent 6261611d37
commit 32b75fb774
No known key found for this signature in database
GPG key ID: DD1A52F9DA8C9020
6 changed files with 20 additions and 19 deletions

View file

@ -40,10 +40,9 @@
'(gpgconf gpg gpg-agent scdaemon gpgsm dirmngr gpg-connect-agent
gpg-preset-passphrase gpgtar pinentry)))
(with-ephemeral-home-directory
(chdir (getenv "GNUPGHOME"))
(create-gpghome)
(start-agent)
(create-legacy-gpghome)
(stop-agent)
(call-check `(,(tool 'gpgtar) --create --output ,(cadr *args*) ".")))
(setenv "GNUPGHOME" (getcwd) #t)
(create-gpghome)
(start-agent)
(create-legacy-gpghome)
(stop-agent)
(call-check `(,(tool 'gpgtar) --create --output ,(cadr *args*) "."))