tests: Fix setup of ephemeral home directories.
authorJustus Winter <justus@g10code.com>
Wed, 5 Apr 2017 13:18:30 +0000 (15:18 +0200)
committerJustus Winter <justus@g10code.com>
Wed, 5 Apr 2017 13:22:42 +0000 (15:22 +0200)
* tests/openpgp/defs.scm (with-ephemeral-home-directory): Set
GNUPGHOME and cwd to the ephemeral directory before calling the setup
function.

GnuPG-bug-id: 3047
Fixes-commit: 32b75fb7743f35936d7014fce33c90ba97dfa374
Signed-off-by: Justus Winter <justus@g10code.com>
tests/openpgp/defs.scm

index 4271ba0..815a560 100644 (file)
        (finally (unlink-recursively ,ephemeral-home-directory)
         (dynamic-wind
             (lambda ()
-              (force ,setup)
-              (setenv "GNUPGHOME" ,ephemeral-home-directory #t))
+              (setenv "GNUPGHOME" ,ephemeral-home-directory #t)
+              (with-working-directory ,ephemeral-home-directory (force ,setup)))
             (lambda () ,@expressions)
             (lambda () (setenv "GNUPGHOME" ,original-home-directory #t)))))))