summaryrefslogtreecommitdiff
path: root/tests/tstunt/gpg
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-08-04 22:27:54 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-08-04 23:06:18 +0100
commit0450dc6909f1543a9515f9e686a5c01c7888073b (patch)
tree5b6c586efbdce2194ee21edfaa98a64adfca9b79 /tests/tstunt/gpg
parenta6c565be751393ef52d2b74919b7ce2744019394 (diff)
test suite: stunt gnupg: Much better logging of race errors
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tstunt/gpg')
-rwxr-xr-xtests/tstunt/gpg12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg
index 790c46c..a108267 100755
--- a/tests/tstunt/gpg
+++ b/tests/tstunt/gpg
@@ -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