1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Change OpenPGP test framework to run under the control of the agent.

This commit is contained in:
Werner Koch 2010-06-07 15:11:35 +00:00
parent bbe388b5db
commit c8eb7bd839
8 changed files with 42 additions and 17 deletions

View file

@ -162,7 +162,7 @@ pgmname=`basename $0`
[ -z "$srcdir" ] && fatal "not called from make"
# Make sure we have a valid option files even with VPATH builds.
for f in gpg.conf gpg-agent.conf; do
for f in gpg.conf ; do
if [ -f ./$f ]; then
:
elif [ -f $srcdir/$f.tmpl ]; then
@ -170,19 +170,23 @@ for f in gpg.conf gpg-agent.conf; do
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=
# Always work in the current directory. We set GNUPGHOME only if it
# has not been set already. Usually it is set through the Makefile's
# TESTS_ENVIRONMENT macro.
if [ -z "$GNUPGHOME" ]; then
GNUPGHOME=`pwd`
export GNUPGHOME
elif [ "$GNUPGHOME" != `pwd` ]; then
echo "$pgmname: GNUPGHOME not set to the cwd" $* >&2
exit 1
fi
GPG="../../g10/gpg2 --no-permission-warning "
exec 5>&2 2>${pgmname}.log
echo "Test: $pgmname" > ${pgmname}.log
echo "GNUPGHOME=$GNUPGHOME" >> ${pgmname}.log
echo "GPG_AGENT_INFO=$GPG_AGENT_INFO" >> ${pgmname}.log
exec 5>&2 2>>${pgmname}.log
:
# end