X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Ftstunt%2Fgpg;h=892b9c8cf446b255a221276463553c88fc83a0f7;hp=790c46c86ed9a3d6b6cf2cfa872f8eb6f446c668;hb=26e97d328b4c4e8d7b8a30120ac2a8dd51295c91;hpb=a6c565be751393ef52d2b74919b7ce2744019394 diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg index 790c46c8..892b9c8c 100755 --- a/tests/tstunt/gpg +++ b/tests/tstunt/gpg @@ -1,7 +1,7 @@ #!/bin/sh set -e -for attempt in '' exec; do +for attempt in '' ' ' exec; do set +e $attempt \ @@ -15,6 +15,18 @@ if [ $rc != 2 ]; then exit $rc; fi echo >&2 "WARNING - GNUPG FAILED $rc - STUNT GNUPG $attempt $*" +sh -ec ' + if [ "x$DGIT_GNUPG_STUNT_ERRLOG" != x ]; then + exec >"$DGIT_GNUPG_STUNT_ERRLOG" + else + exec 2>/dev/null + fi + exec >/dev/tty + printf "%s\n" "$*" +' x "GNUPG WRAPPER - TROUBLE - $HOME $GNUPGHOME - FAILED $rc $attempt $*" + +sleep 10 + done exit 127