chiark / gitweb /
test suite: gnupg workaround: Remove a sprurious $tmp
[dgit.git] / tests / tstunt / gpg
index a108267d3ce568edc4abaaa1711ac1d3a8050778..79d8319929719c46777e841c54c54bbd654c9591 100755 (executable)
@@ -1,32 +1,6 @@
 #!/bin/sh
 set -e
 
-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 $*"
-
-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
+exec \
+with-lock-ex -w "$DGIT_TEST_GNUPG_GLOBAL_LOCK" \
+       "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@"