aboutsummaryrefslogtreecommitdiffstats
path: root/tests/openpgp/defs.inc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/openpgp/defs.inc')
-rwxr-xr-xtests/openpgp/defs.inc24
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/openpgp/defs.inc b/tests/openpgp/defs.inc
index 2a7683eb6..da7ee3020 100755
--- a/tests/openpgp/defs.inc
+++ b/tests/openpgp/defs.inc
@@ -162,13 +162,25 @@ pgmname=`basename $0`
[ -z "$srcdir" ] && fatal "not called from make"
# Make sure we have a valid option files even with VPATH builds.
-if [ -f ./gpg.conf ]; then
- :
-elif [ -f $srcdir/gpg.conf.tmpl ]; then
- cat $srcdir/gpg.conf.tmpl >gpg.conf
-fi
+for f in gpg.conf gpg-agent.conf; do
+ if [ -f ./$f ]; then
+ :
+ elif [ -f $srcdir/$f.tmpl ]; then
+ cat $srcdir/$f.tmpl >$f
+ fi
+done
+
+# Always work in the current directory
+GNUPGHOME=`pwd`
+export GNUPGHOME
+
+# We do not use an external info variable for gpg-agent because we use
+# a standard socket in the home directory. This way gpg-agent will be
+# started as soon as needed. It is terminated indirectly using a
+# Makefile rule.
+GPG_AGENT_INFO=
-GPG="../../g10/gpg2 --no-permission-warning --homedir . "
+GPG="../../g10/gpg2 --no-permission-warning "
exec 5>&2 2>${pgmname}.log