summaryrefslogtreecommitdiff
path: root/tests/tstunt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tstunt')
-rwxr-xr-xtests/tstunt/gpg-locked22
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/tstunt/gpg-locked b/tests/tstunt/gpg-locked
index ddb880f..9dfda26 100755
--- a/tests/tstunt/gpg-locked
+++ b/tests/tstunt/gpg-locked
@@ -29,15 +29,19 @@ if [ $rc != 2 ]; then exit $rc; fi
echo >&2 "WARNING - GNUPG FAILED $rc - STUNT GNUPG $attempt $stdin_tmp_bytes $*"
-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 $stdin_tmp_bytes $*"
+if [ "$stdin_tmp_bytes" = 0 ]; then
+ sleep 5
+else
+ 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 $stdin_tmp_bytes $*"
+fi
sleep 10