summaryrefslogtreecommitdiff
path: root/tests/setup/gnupg
blob: 6100bf575fe7e8bfaf2d1b3d3a892d32544cd6c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -e
. tests/lib

mkdir -p $tmp/gnupg
cp $troot/gnupg/* $tmp/gnupg
chmod go-rw $tmp/gnupg/*

export GNUPGHOME=$tmp/gnupg

cat >$tmp/gnupg/gpg-agent.conf <<END
log-file $tmp/gnupg/AGENT.log
END
#debug-all

setup='
	export DGIT_TEST_REAL_GPG_AGENT=$(type -p gpg-agent)
	export DGIT_STUNT_AGENT=$troot/tstunt/gpg-agent
	export GNUPGHOME
	t-tstunt gpg
'

eval "$setup"

gpg --list-secret

t-setup-done 'GNUPGHOME' 'gnupg' "$setup"

t-ok