From a8b72af35d6956002153e771d1ada5277d5a1bd6 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sat, 4 Apr 2015 18:34:45 -0400 Subject: [PATCH] tests: Kill the gpg-agent process when finished. --- tests/common.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/common.sh b/tests/common.sh index 346f78ff..761736ff 100644 --- a/tests/common.sh +++ b/tests/common.sh @@ -3,6 +3,14 @@ on_exit() { kill $PID fi + if [ $USE_AGENT ]; then + local agent_pid=`echo GETINFO pid | gpg-connect-agent -S "$WDIR"/S.gpg-agent | sed -ne '1p' | cut -b 2-` + if [ $? -eq 0 ]; then + kill $agent_pid + fi + unset agent_pid + fi + rm -f config } -- 2.11.4.GIT