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 GPGTAR (path-join (getenv "objdir") "tools" (qualify "gpgtar")))
|
||||||
|
|
||||||
(define (untar-armored source-name)
|
(define (untar-armored source-name)
|
||||||
(pipe:do
|
(with-ephemeral-home-directory (lambda ())
|
||||||
(pipe:open source-name (logior O_RDONLY O_BINARY))
|
(pipe:do
|
||||||
(pipe:spawn `(,@GPG --dearmor))
|
(pipe:open source-name (logior O_RDONLY O_BINARY))
|
||||||
(pipe:spawn `(,GPGTAR --extract --directory=. -))))
|
(pipe:spawn `(,@GPG --dearmor))
|
||||||
|
(pipe:spawn `(,GPGTAR --extract --directory=. -)))))
|
||||||
|
|
||||||
(define (run-test message src-tarball test)
|
(define (run-test message src-tarball test)
|
||||||
(catch (skip "gpgtar not built")
|
(catch (skip "gpgtar not built")
|
||||||
|
@ -201,7 +201,8 @@
|
|||||||
|
|
||||||
(define have-opt-always-trust
|
(define have-opt-always-trust
|
||||||
(catch #f
|
(catch #f
|
||||||
(call-check `(,(tool 'gpg) --gpgconf-test --always-trust))
|
(with-ephemeral-home-directory (lambda ())
|
||||||
|
(call-check `(,(tool 'gpg) --gpgconf-test --always-trust)))
|
||||||
#t))
|
#t))
|
||||||
|
|
||||||
(define GPG `(,(tool 'gpg) --no-permission-warning
|
(define GPG `(,(tool 'gpg) --no-permission-warning
|
||||||
|
Loading…
x
Reference in New Issue
Block a user