aboutsummaryrefslogtreecommitdiffstats
path: root/tests/openpgp/setup.scm
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-05-11 15:17:12 +0000
committerJustus Winter <[email protected]>2017-05-11 16:12:38 +0000
commitbc01d62dc5d520e138499df5d80fb50f9e87e3e8 (patch)
tree1f95db21b1e044ccf097dadc7e0906852121ce1b /tests/openpgp/setup.scm
parenttests: Make it possible to run all tests using our infrastructure. (diff)
downloadgnupg-bc01d62dc5d520e138499df5d80fb50f9e87e3e8.tar.gz
gnupg-bc01d62dc5d520e138499df5d80fb50f9e87e3e8.zip
tests: Also run all OpenPGP tests using keyrings.
* tests/openpgp/all-tests.scm: Run each test twice, once with public keys stored in a keybox, once with a keyring. * tests/openpgp/defs.scm (create-gpghome): Create a public keyring to make GnuPG use that instead of creating a keybox if '--use-keyring' is given. * tests/openpgp/setup.scm: Fix flag handling and usage. -- This parametrizes the OpenPGP tests. With this change, the test suite is able to detect problems with the keyring store, e.g. like the one fixed in 22739433e98be80e46fe7d01d52a9627c1aebaae. GnuPG-bug-id: 3080 Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'tests/openpgp/setup.scm')
-rwxr-xr-xtests/openpgp/setup.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/openpgp/setup.scm b/tests/openpgp/setup.scm
index 00eed53fc..22c89a389 100755
--- a/tests/openpgp/setup.scm
+++ b/tests/openpgp/setup.scm
@@ -19,8 +19,9 @@
(load (in-srcdir "tests" "openpgp" "defs.scm"))
-(unless (member "--create-tarball" *args*)
- (fail "Usage: setup.scm --create-tarball <file>"))
+(define cache (flag "--create-tarball" *args*))
+(unless (and cache (= 1 (length cache)))
+ (fail "Usage: setup.scm --create-tarball <file> [--use-keyring]"))
(when (> (*verbose*) 0)
(define (pad symbol length)
@@ -45,4 +46,4 @@
(start-agent)
(create-legacy-gpghome)
(stop-agent)
-(call-check `(,(tool 'gpgtar) --create --output ,(cadr *args*) "."))
+(call-check `(,(tool 'gpgtar) --create --output ,(car cache) "."))