[Pkg-gnupg-commit] [gnupg2] 58/185: tests: Run the OpenPGP tests using the new extended key format.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Aug 7 11:55:20 UTC 2017


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit b766d3d1034e6068a91755ada68f7f7dbe2943b6
Author: Justus Winter <justus at g10code.com>
Date:   Mon Jun 19 10:17:57 2017 +0200

    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 at g10code.com>
---
 tests/openpgp/all-tests.scm | 22 ++++++++++++++++------
 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 6584df2..4dd6d6f 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 a61e6c3..50976b9 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))
 	       ))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list