[Pkg-gnupg-commit] [gnupg2] 117/180: tests: Rework check for trust models.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Sat Dec 24 22:29:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 55dc81125abc43cd3cc8db951fc3b8a81767942d
Author: Justus Winter <justus at g10code.com>
Date: Wed Dec 14 11:45:52 2016 +0100
tests: Rework check for trust models.
* tests/openpgp/defs.scm (gpg-has-option?): New function.
(have-opt-always-trust): Use a simpler test for that option. This way
that is less distracting when we run the tests with verbose=3.
Signed-off-by: Justus Winter <justus at g10code.com>
---
tests/openpgp/defs.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm
index b198cdd..5249ca9 100644
--- a/tests/openpgp/defs.scm
+++ b/tests/openpgp/defs.scm
@@ -76,9 +76,14 @@
(string-append prefix "/" (basename (caddr t))))))))
-(define have-opt-always-trust
+(define (gpg-has-option? option)
(string-contains? (call-popen `(,(tool 'gpg) --dump-options) "")
- "--always-trust"))
+ option))
+
+(define have-opt-always-trust
+ (catch #f
+ (call-check `(,(tool 'gpg) --gpgconf-test --always-trust))
+ #t))
(define GPG `(,(tool 'gpg) --no-permission-warning
,@(if have-opt-always-trust '(--always-trust) '())))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list