[devscripts] 03/04: Kill gpg-agent as part of test cleanup

James McCoy jamessan at debian.org
Mon Aug 22 04:03:04 UTC 2016


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

jamessan pushed a commit to branch master
in repository devscripts.

commit 4038fbd93536c17ec2ad9cdb1b68acaae5782184
Author: James McCoy <jamessan at debian.org>
Date:   Sun Aug 21 22:17:50 2016 -0400

    Kill gpg-agent as part of test cleanup
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 test/test_package_lifecycle |  1 +
 test/test_uscan_mangle      | 24 +++++++++++++-----------
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/test/test_package_lifecycle b/test/test_package_lifecycle
index 6f22629..a0fba73 100755
--- a/test/test_package_lifecycle
+++ b/test/test_package_lifecycle
@@ -295,6 +295,7 @@ EOS
 
 oneTimeTearDown () {
 	rm -rf ${WORKDIR}/package_lifecycle
+	gpgconf --homedir "$GPGHOME" --kill gpg-agent
 	rm -rf $GPGHOME
 }
 
diff --git a/test/test_uscan_mangle b/test/test_uscan_mangle
index 6ac46ca..0a6c73a 100755
--- a/test/test_uscan_mangle
+++ b/test/test_uscan_mangle
@@ -59,19 +59,20 @@ PUBLIC_KEYRING=$GPGHOME/pubring.gpg
 
 
 oneTimeSetUp () {
+    rm -rf $GPGHOME
+    mkdir -p $GPGHOME
+    chmod 700 $GPGHOME
+    $GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+	    --output $PRIVATE_KEYRING --dearmor $PRIVATE_KEY
 
-	rm -rf $GPGHOME
-	mkdir -p $GPGHOME
-	chmod 700 $GPGHOME
-	$GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
-		--output $PRIVATE_KEYRING --dearmor $PRIVATE_KEY
+    $GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+	    --output $PUBLIC_KEYRING --dearmor $PUBLIC_KEY
 
-	$GPG -v --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
-		--output $PUBLIC_KEYRING --dearmor $PUBLIC_KEY
+    $GPG --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
+	    --secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
+	    --list-keys --verbose
 
-	$GPG --homedir $GPGHOME --no-options -q --batch --no-default-keyring \
-		--secret-keyring $PRIVATE_KEYRING --default-key 72543FAF \
-		--list-keys --verbose
+    export GNUPGHOME=$GPGHOME
 }
 
 # Initial Debian revision value is distribution dependent
@@ -994,7 +995,8 @@ opts="component=baz,pgpsigurlmangle=s/$/.asc/" @@@url@@@ (?:.*)/baz at ANY_VERSION@
 }
 
 oneTimeTearDown () {
-	rm -rf ${GPGHOME}
+    gpgconf --homedir "$GPGHOME" --verbose --kill gpg-agent
+    rm -rf ${GPGHOME}
 }
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list