X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=blobdiff_plain;f=tests%2Ftstunt%2Fgpg;h=7e12846c46470a1418d7b53a6f49b33018555dbb;hp=79d8319929719c46777e841c54c54bbd654c9591;hb=refs%2Ftags%2Farchive%2Fdebian%2F5.5%2Bexp8;hpb=38eae0db7f393311667bec9dfe0aa7a514b893bd diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg index 79d83199..7e12846c 100755 --- a/tests/tstunt/gpg +++ b/tests/tstunt/gpg @@ -3,4 +3,18 @@ set -e exec \ with-lock-ex -w "$DGIT_TEST_GNUPG_GLOBAL_LOCK" \ + sh -c ' + "$@" 9>&2 2>>"$DGIT_TEST_GNUPG_LOG" + rc=$? + if [ rc = 0 ]; then exit 0; fi + if [ "x$DGIT_TEST_BYHAND" != x ]; then + echo >&2 "BYHAND, not catting $DGIT_TEST_GNUPG_LOG" + else + echo >&2 "########################################" + echo >&2 "$DGIT_TEST_GNUPG_LOG" + cat >&2 "$DGIT_TEST_GNUPG_LOG" + echo >&2 "end of $DGIT_TEST_GNUPG_LOG" + fi + exit $rc + ' x \ "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@"