1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

tests: Run the OpenPGP tests using the new extended key format.

* tests/openpgp/all-tests.scm: Generalize a bit, and also add a
variant that uses the new extended key format.
* tests/openpgp/defs.scm (create-gpghome): Conditionally enable the
new extended key format.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-06-19 10:17:57 +02:00
parent 3419a339d9
commit b766d3d103
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020
2 changed files with 18 additions and 6 deletions

View File

@ -33,13 +33,19 @@
(path-join "tests" "openpgp" "setup.scm")
(in-srcdir "tests" "openpgp" "setup.scm"))))
(define setup-use-keyring
(define (qualify path variant)
(string-append "<" variant ">" path))
(define (setup* variant)
(make-environment-cache
(test::scm
#f
(string-append "<use-keyring>" (path-join "tests" "openpgp" "setup.scm"))
(qualify (path-join "tests" "openpgp" "setup.scm") variant)
(in-srcdir "tests" "openpgp" "setup.scm")
"--use-keyring")))
(string-append "--" variant))))
(define setup-use-keyring (setup* "use-keyring"))
(define setup-extended-key-format (setup* "extended-key-format"))
(define all-tests
(parse-makefile-expand (in-srcdir "tests" "openpgp" "Makefile.am")
@ -52,7 +58,11 @@
(in-srcdir "tests" "openpgp" name))) all-tests)
(map (lambda (name)
(test::scm setup-use-keyring
(string-append "<use-keyring>"
(path-join "tests" "openpgp" name))
(qualify (path-join "tests" "openpgp" name) "use-keyring")
(in-srcdir "tests" "openpgp" name)
"--use-keyring")) all-tests)))
"--use-keyring")) all-tests)
(map (lambda (name)
(test::scm setup-extended-key-format
(qualify (path-join "tests" "openpgp" name) "extended-key-format")
(in-srcdir "tests" "openpgp" name)
"--extended-key-format")) all-tests)))

View File

@ -348,6 +348,8 @@
"allow-preset-passphrase"
"no-grab"
"enable-ssh-support"
(if (flag "--extended-key-format" *args*)
"enable-extended-key-format" "#enable-extended-key-format")
(string-append "pinentry-program " (tool 'pinentry))
(string-append "scdaemon-program " (tool 'scdaemon))
))