chiark / gitweb /
test suite: Drop alwayssplit tests
[dgit.git] / tests / tstunt / gpg
1 #!/bin/sh
2 set -e
3
4 exec \
5 with-lock-ex -w "$DGIT_TEST_GNUPG_GLOBAL_LOCK" \
6         sh -c '
7                 "$@" 9>&2 2>>"$DGIT_TEST_GNUPG_LOG"
8                 rc=$?
9                 if [ $rc = 0 ]; then exit 0; fi
10                 if [ "x$DGIT_TEST_BYHAND" != x ]; then
11                         echo >&2 "BYHAND, not dumping $DGIT_TEST_GNUPG_LOG"
12                 else
13                         echo >&2 "########################################"
14                         echo >&2 "$DGIT_TEST_GNUPG_LOG"
15                         sed '\''s/^/\[gnupg-workarounds] /'\'' >&2 \
16                                 "$DGIT_TEST_GNUPG_LOG"
17                         echo >&2 "end of $DGIT_TEST_GNUPG_LOG"
18                         echo >&2 "########################################"
19                 fi
20                 exit $rc
21         ' x \
22         "$DGIT_TEST_TROOT"/tstunt/gpg-withagent "$@"