[Pkg-gnupg-commit] [gnupg2] 225/292: tests: Simplify test.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Nov 21 06:31:45 UTC 2016


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

dkg pushed a commit to branch master
in repository gnupg2.

commit 4dd4801bfa4c3f7ba279b3d171a8ed299dbffaaa
Author: Justus Winter <justus at g10code.com>
Date:   Tue Nov 8 15:38:17 2016 +0100

    tests: Simplify test.
    
    * tests/openpgp/issue2417.scm: Simplify.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tests/openpgp/issue2417.scm | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/tests/openpgp/issue2417.scm b/tests/openpgp/issue2417.scm
index 5f70e08..f584000 100755
--- a/tests/openpgp/issue2417.scm
+++ b/tests/openpgp/issue2417.scm
@@ -18,27 +18,15 @@
 ;; along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 (load (with-path "defs.scm"))
-(setup-legacy-environment)
+(setup-environment)
 
-(define old-home (getenv "GNUPGHOME"))
+(define keyfile (in-srcdir "samplekeys" "rsa-rsa-sample-1.asc"))
 
 (define (touch file-name)
   (close (open file-name (logior O_WRONLY O_BINARY O_CREAT) #o600)))
 
 (info "Checking robustness wrt empty databases in gnupghome (issue2417)...")
-
-(lettmp
- ;; Prepare some random key to import later.
- (keyfile)
- (pipe:do
-  (pipe:gpg '(--export alpha))
-  (pipe:write-to keyfile (logior O_WRONLY O_BINARY O_CREAT) #o600))
-
- (with-temporary-working-directory
-  (file-copy (path-join old-home "gpg.conf") "gpg.conf")
-  (file-copy (path-join old-home "gpg-agent.conf") "gpg-agent.conf")
-  (setenv "GNUPGHOME" "." #t)
-  (touch "trustdb.gpg")
-  (touch "pubring.gpg")
-  (touch "pubring.kbx")
-  (call-check `(,(tool 'GPG) --import ,keyfile))))
+(touch "trustdb.gpg")
+(touch "pubring.gpg")
+(touch "pubring.kbx")
+(call-check `(,(tool 'GPG) --import ,keyfile))

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