chiark / gitweb /
dgit: Drop an obsolete xxx comment
[dgit.git] / tests / setup / gnupg
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 mkdir -p $tmp/gnupg
6 cp $troot/gnupg/* $tmp/gnupg
7 chmod go-rw $tmp/gnupg/*
8
9 export DGIT_TEST_GNUPG_GLOBAL_LOCK=$tmp/gnupg/dgit-test-global-lock
10 export DGIT_TEST_GNUPG_LOG=$tmp/gnupg-workarounds.log
11
12 setup='
13         export GNUPGHOME=$tmp/gnupg
14         export DGIT_TEST_GNUPG_GLOBAL_LOCK DGIT_TEST_GNUPG_LOG
15
16         cat >$tmp/gnupg/gpg-agent.conf <<END
17         log-file $tmp/gnupg/AGENT.log
18 END
19         #debug-all
20
21         : ${DGIT_TEST_REAL_GPG_AGENT:=$(type -p gpg-agent)}
22         export DGIT_TEST_REAL_GPG_AGENT=$(type -p gpg-agent)
23         export DGIT_STUNT_AGENT=$troot/tstunt/gpg-agent
24         t-tstunt gpg
25 '
26
27 eval "$setup"
28
29 gpg --list-secret
30
31 t-setup-done 'DGIT_TEST_GNUPG_GLOBAL_LOCK DGIT_TEST_GNUPG_LOG' \
32         'gnupg' "$setup"