mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
tests: Make tests more robust.
* tests/openpgp/defs.scm (have-opt-always-trust): Execute in empty ephemeral home directory. This prevents gpg from picking up the configuration from the current gnupghome (if any). * tests/migrations/common.scm (untar-armored): Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
ccd2187212
commit
1b28d9dbe0
@ -39,10 +39,11 @@
|
||||
(define GPGTAR (path-join (getenv "objdir") "tools" (qualify "gpgtar")))
|
||||
|
||||
(define (untar-armored source-name)
|
||||
(pipe:do
|
||||
(pipe:open source-name (logior O_RDONLY O_BINARY))
|
||||
(pipe:spawn `(,@GPG --dearmor))
|
||||
(pipe:spawn `(,GPGTAR --extract --directory=. -))))
|
||||
(with-ephemeral-home-directory (lambda ())
|
||||
(pipe:do
|
||||
(pipe:open source-name (logior O_RDONLY O_BINARY))
|
||||
(pipe:spawn `(,@GPG --dearmor))
|
||||
(pipe:spawn `(,GPGTAR --extract --directory=. -)))))
|
||||
|
||||
(define (run-test message src-tarball test)
|
||||
(catch (skip "gpgtar not built")
|
||||
|
@ -201,7 +201,8 @@
|
||||
|
||||
(define have-opt-always-trust
|
||||
(catch #f
|
||||
(call-check `(,(tool 'gpg) --gpgconf-test --always-trust))
|
||||
(with-ephemeral-home-directory (lambda ())
|
||||
(call-check `(,(tool 'gpg) --gpgconf-test --always-trust)))
|
||||
#t))
|
||||
|
||||
(define GPG `(,(tool 'gpg) --no-permission-warning
|
||||
|
Loading…
x
Reference in New Issue
Block a user