X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Ftstunt%2Fgpg-withagent;h=d7fe793e7cdf36b9216d94343a043d0a328ecb64;hb=7d0d834d7b41b5f3cafffc37b9a9d94966c68e0f;hp=4cb5d4e619ee75d81eb1351883d2f21ad9a010c5;hpb=a0e481f58a8d70a2a87d59e3e3eda0c32f4c99d2;p=dgit.git diff --git a/tests/tstunt/gpg-withagent b/tests/tstunt/gpg-withagent index 4cb5d4e6..d7fe793e 100755 --- a/tests/tstunt/gpg-withagent +++ b/tests/tstunt/gpg-withagent @@ -1,9 +1,18 @@ #!/bin/sh set -ex +d () { + date --iso-8601=ns >&2 + ps -ef | grep gpg-agent >&2 +} + +d + retry_until_ok () { sleeptime=0 + d while ! "$@"; do + d case $sleeptime in ??.*) echo >&2 "$0: GPG AGENT STARTP $@ TIMED OUT" @@ -29,12 +38,16 @@ retry_until_ok agent_is_running echo >&2 'GPG-WITHAGENT... RUNNING' +d + set +e $DGIT_TEST_REAL_GPG \ --agent-program=$DGIT_STUNT_AGENT "$@" rc=$? set -e +d + echo >&2 'GPG-WITHAGENT... STOPPING' kill_agent_not_running () { @@ -48,4 +61,6 @@ retry_until_ok kill_agent_not_running echo >&2 'GPG-WITHAGENT... DONE' +d + exit $rc