[Pkg-gnupg-commit] [gnupg2] 06/07: port tests to gpg2

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Mar 30 06:05:49 UTC 2016


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

dkg pushed a commit to branch experimental
in repository gnupg2.

commit d668dc2ac8bcb1c1c1202900261fa5383256eda7
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Wed Mar 30 01:07:15 2016 -0400

    port tests to gpg2
---
 debian/tests/control    |  2 +-
 debian/tests/gpgv-win32 | 22 ++++++++--------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/debian/tests/control b/debian/tests/control
index cea1cf6..0330032 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,2 +1,2 @@
 Tests: gpgv-win32
-Depends: gpgv-win32, wine, wine32, gpg
+Depends: gpgv-win32, wine, wine32, gpg2, gpgv2
diff --git a/debian/tests/gpgv-win32 b/debian/tests/gpgv-win32
index d00ece1..8036099 100644
--- a/debian/tests/gpgv-win32
+++ b/debian/tests/gpgv-win32
@@ -4,25 +4,19 @@ set -e
 
 export GNUPGHOME=$(mktemp -d)
 
+echo 'allow-loopback-pinentry:0:1' | gpgconf --change-options gpg-agent
+
 # Generate a minimal signing key:
-gpg --batch --quick-random --gen-key <<EOF
-     %echo Generating a basic OpenPGP key
-     Key-Type: RSA
-     Key-Length: 1024
-     Key-Usage: sign
-     Name-Real: Test key for gpgv-win32
-     Name-Email: test-key at example.com
-     Expire-Date: 2d
-     %commit
-     %echo done
-EOF
+gpg2 --batch --debug-quick-random --pinentry-mode loopback --passphrase '' --quick-gen-key   'Test key for gpgv-win32 <test-key at example.com>'
+
+gpg2 -o "$GNUPGHOME/key.gpg" --export test-key at example.com
 
 # Sign this very script
 rm -f "${0}.gpg"
-gpg --output "${0}.gpg" --detach-sign "${0}"
+gpg2 --output "${0}.gpg" --detach-sign "${0}"
 
 # Verify using gpgv
-gpgv --keyring "$GNUPGHOME/pubring.gpg" "${0}.gpg" "${0}"
+gpgv2 --keyring "$GNUPGHOME/key.gpg" "${0}.gpg" "${0}"
 
 # Verify using gpgv.exe
-wine /usr/share/win32/gpgv.exe --keyring "Z:\\\\${GNUPGHOME}/pubring.gpg" "Z:\\\\$(pwd)/${0}.gpg" "Z:\\\\$(pwd)/${0}"
+wine32 /usr/share/win32/gpgv.exe --keyring "Z:\\\\${GNUPGHOME}/key.gpg" "Z:\\\\$(pwd)/${0}.gpg" "Z:\\\\$(pwd)/${0}"

-- 
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