diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-29 12:13:59 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-29 12:14:00 +0100 |
commit | 395e13bd154a9d00ffb25cff3f45e3afa8222d13 (patch) | |
tree | acddb0c3f7f1386cdc37f6a9a1c6ca3ccf2d244c | |
parent | 7d0d834d7b41b5f3cafffc37b9a9d94966c68e0f (diff) |
test suite: gpg-agent workaround: Kill unexpected leftover agents.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | tests/tstunt/gpg-withagent | 18 |
2 files changed, 11 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index 7850597..bc809a7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ dgit (5.5+exp5~) experimental; urgency=medium * test suite: gpg-agent workaround: Add more debugging output. + * test suite: gpg-agent workaround: Kill unexpected leftover agents. -- 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' |