mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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 22739433e9
.
GnuPG-bug-id: 3080
Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
f4365790da
commit
bc01d62dc5
3 changed files with 32 additions and 12 deletions
|
@ -31,13 +31,28 @@
|
|||
(test::scm
|
||||
#f
|
||||
(path-join "tests" "openpgp" "setup.scm")
|
||||
(in-srcdir "tests" "openpgp" "setup.scm")
|
||||
"--" "tests" "gpg")))
|
||||
(in-srcdir "tests" "openpgp" "setup.scm"))))
|
||||
|
||||
(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 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")
|
||||
"--use-keyring")))
|
||||
|
||||
(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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue