chiark / gitweb /
test suite: gnupg setup: give each individual test its own AGENT.log
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 6 Jan 2018 13:56:42 +0000 (13:56 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 7 Jan 2018 16:18:53 +0000 (16:18 +0000)
This was always the intent.  However, the structure here arranged to
put the actual value of GNUPGHOME into the import script.

Instead, move the GNUGPHOME setting into the setup fragment, which is
evaluated by the importer.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/setup/gnupg

index 43a5c96db91558766c91658f80906567b99484ea..9b4d09908e107cb73cfa8e40f13e4f8837c793a4 100755 (executable)
@@ -6,18 +6,17 @@ mkdir -p $tmp/gnupg
 cp $troot/gnupg/* $tmp/gnupg
 chmod go-rw $tmp/gnupg/*
 
-export GNUPGHOME=$tmp/gnupg
+setup='
+       export GNUPGHOME=$tmp/gnupg
 
-cat >$tmp/gnupg/gpg-agent.conf <<END
-log-file $tmp/gnupg/AGENT.log
+       cat >$tmp/gnupg/gpg-agent.conf <<END
+       log-file $tmp/gnupg/AGENT.log
 END
-#debug-all
+       #debug-all
 
-setup='
        : ${DGIT_TEST_REAL_GPG_AGENT:=$(type -p gpg-agent)}
        export DGIT_TEST_REAL_GPG_AGENT=$(type -p gpg-agent)
        export DGIT_STUNT_AGENT=$troot/tstunt/gpg-agent
-       export GNUPGHOME
        t-tstunt gpg
 '
 
@@ -25,6 +24,6 @@ eval "$setup"
 
 gpg --list-secret
 
-t-setup-done 'GNUPGHOME' 'gnupg' "$setup"
+t-setup-done '' 'gnupg' "$setup"
 
 t-ok