diff options
author | Justus Winter <justus@g10code.com> | 2017-06-19 10:17:57 +0200 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2017-06-19 16:51:26 +0200 |
commit | b766d3d1034e6068a91755ada68f7f7dbe2943b6 (patch) | |
tree | 50a64fb975c749f019e999f55d1cf46e010290fa /tests | |
parent | Change license of some files to LGPLv2.1. (diff) | |
download | gnupg2-b766d3d1034e6068a91755ada68f7f7dbe2943b6.tar.xz gnupg2-b766d3d1034e6068a91755ada68f7f7dbe2943b6.zip |
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>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/openpgp/all-tests.scm | 22 | ||||
-rw-r--r-- | tests/openpgp/defs.scm | 2 |
2 files changed, 18 insertions, 6 deletions
diff --git a/tests/openpgp/all-tests.scm b/tests/openpgp/all-tests.scm index 6584df26e..4dd6d6fe1 100644 --- a/tests/openpgp/all-tests.scm +++ b/tests/openpgp/all-tests.scm @@ -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) + (map (lambda (name) + (test::scm setup-extended-key-format + (qualify (path-join "tests" "openpgp" name) "extended-key-format") (in-srcdir "tests" "openpgp" name) - "--use-keyring")) all-tests))) + "--extended-key-format")) all-tests))) diff --git a/tests/openpgp/defs.scm b/tests/openpgp/defs.scm index a61e6c318..50976b9eb 100644 --- a/tests/openpgp/defs.scm +++ b/tests/openpgp/defs.scm @@ -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)) )) |