diff options
author | Justus Winter <[email protected]> | 2016-12-14 10:45:52 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-12-14 15:41:18 +0000 |
commit | 55dc81125abc43cd3cc8db951fc3b8a81767942d (patch) | |
tree | 6f22936923d735b02595a7fbf7874a8463a9f9c5 | |
parent | common: Fix typo. (diff) | |
download | gnupg-55dc81125abc43cd3cc8db951fc3b8a81767942d.tar.gz gnupg-55dc81125abc43cd3cc8db951fc3b8a81767942d.zip |
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 <[email protected]>
-rw-r--r-- | tests/openpgp/defs.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm index b198cddd9..5249ca9da 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) '()))) |