summaryrefslogtreecommitdiff
path: root/tests/tstunt/gpg-withagent
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tstunt/gpg-withagent')
-rwxr-xr-xtests/tstunt/gpg-withagent18
1 files changed, 10 insertions, 8 deletions
diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent
index d7fe793..4318cce 100755
--- a/tests/tstunt/gpg-withagent
+++ b/tests/tstunt/gpg-withagent
@@ -24,7 +24,16 @@ retry_until_ok () {
done
}
-echo >&2 'GPG-WITHAGENT...'
+kill_agent_not_running () {
+ LC_MESSAGES=C gpg-connect-agent --no-autostart </dev/null \
+ KILLAGENT /bye 2>&1 \
+ | tee -a /dev/stderr \
+ | grep 'no gpg-agent running' >&2
+}
+
+echo >&2 'GPG-WITHAGENT... PRE-STOPPING'
+
+retry_until_ok kill_agent_not_running
agent_is_running () {
gpg-connect-agent --no-autostart </dev/null \
@@ -50,13 +59,6 @@ d
echo >&2 'GPG-WITHAGENT... STOPPING'
-kill_agent_not_running () {
- LC_MESSAGES=C gpg-connect-agent --no-autostart </dev/null \
- KILLAGENT /bye 2>&1 \
- | tee -a /dev/stderr \
- | grep 'no gpg-agent running' >&2
-}
-
retry_until_ok kill_agent_not_running
echo >&2 'GPG-WITHAGENT... DONE'