aboutsummaryrefslogtreecommitdiffstats
path: root/tests/openpgp/all-tests.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/all-tests.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/all-tests.scm')
-rw-r--r--tests/openpgp/all-tests.scm31
1 files changed, 23 insertions, 8 deletions
diff --git a/tests/openpgp/all-tests.scm b/tests/openpgp/all-tests.scm
index 4b14c4e04..6584df26e 100644
--- a/tests/openpgp/all-tests.scm
+++ b/tests/openpgp/all-tests.scm
@@ -31,13 +31,28 @@
(test::scm
#f
(path-join "tests" "openpgp" "setup.scm")
+ (in-srcdir "tests" "openpgp" "setup.scm"))))
+
+ (define setup-use-keyring
+ (make-environment-cache
+ (test::scm
+ #f
+ (string-append "<use-keyring>" (path-join "tests" "openpgp" "setup.scm"))
(in-srcdir "tests" "openpgp" "setup.scm")
- "--" "tests" "gpg")))
+ "--use-keyring")))
- (map (lambda (name)
- (test::scm setup
- (path-join "tests" "openpgp" name)
- (in-srcdir "tests" "openpgp" name)))
- (parse-makefile-expand (in-srcdir "tests" "openpgp" "Makefile.am")
- (lambda (filename port key) (parse-makefile port key))
- "XTESTS")))
+ (define all-tests
+ (parse-makefile-expand (in-srcdir "tests" "openpgp" "Makefile.am")
+ (lambda (filename port key) (parse-makefile port key))
+ "XTESTS"))
+ (append
+ (map (lambda (name)
+ (test::scm setup
+ (path-join "tests" "openpgp" name)
+ (in-srcdir "tests" "openpgp" name))) all-tests)
+ (map (lambda (name)
+ (test::scm setup-use-keyring
+ (string-append "<use-keyring>"
+ (path-join "tests" "openpgp" name))
+ (in-srcdir "tests" "openpgp" name)
+ "--use-keyring")) all-tests)))