summaryrefslogtreecommitdiff
path: root/tests/tstunt/gpg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tstunt/gpg')
-rwxr-xr-xtests/tstunt/gpg16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/tstunt/gpg b/tests/tstunt/gpg
index d71aa63..790c46c 100755
--- a/tests/tstunt/gpg
+++ b/tests/tstunt/gpg
@@ -1,6 +1,20 @@
#!/bin/sh
set -e
-exec \
+
+for attempt in '' exec; do
+
+set +e
+$attempt \
$DGIT_TEST_REAL_GPG \
--agent-program=$DGIT_STUNT_AGENT \
"$@"
+rc=$?
+set -e
+
+if [ $rc != 2 ]; then exit $rc; fi
+
+echo >&2 "WARNING - GNUPG FAILED $rc - STUNT GNUPG $attempt $*"
+
+done
+
+exit 127