[svn] GnuPG - r5336 - in branches/STABLE-BRANCH-2-0: agent tests tests/openpgp
svn author wk
cvs at cvs.gnupg.org
Wed May 12 11:49:28 CEST 2010
Author: wk
Date: 2010-05-12 11:49:28 +0200 (Wed, 12 May 2010)
New Revision: 5336
Modified:
branches/STABLE-BRANCH-2-0/agent/ChangeLog
branches/STABLE-BRANCH-2-0/agent/gpg-agent.c
branches/STABLE-BRANCH-2-0/tests/Makefile.am
branches/STABLE-BRANCH-2-0/tests/inittests
branches/STABLE-BRANCH-2-0/tests/openpgp/ChangeLog
branches/STABLE-BRANCH-2-0/tests/openpgp/Makefile.am
branches/STABLE-BRANCH-2-0/tests/openpgp/defs.inc
branches/STABLE-BRANCH-2-0/tests/openpgp/gpg-agent.conf.tmpl
Log:
Changed test system again to allow building on an NFS mount
Modified: branches/STABLE-BRANCH-2-0/agent/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-2-0/agent/ChangeLog 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/agent/ChangeLog 2010-05-12 09:49:28 UTC (rev 5336)
@@ -1,3 +1,7 @@
+2010-05-12 Werner Koch <wk at g10code.com>
+
+ * gpg-agent.c (handle_tick): Do not print die message with option -q.
+
2010-05-11 Werner Koch <wk at g10code.com>
* agent.h (opt): Add field USE_STANDARD_SOCKET.
Modified: branches/STABLE-BRANCH-2-0/tests/openpgp/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-2-0/tests/openpgp/ChangeLog 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/tests/openpgp/ChangeLog 2010-05-12 09:49:28 UTC (rev 5336)
@@ -1,3 +1,12 @@
+2010-05-12 Werner Koch <wk at g10code.com>
+
+ * Makefile.am (TESTS_ENVIRONMENT): New. Start all scripts udner
+ the control of the gpg-agent.
+ (prepared.stamp): Create gpg-agent.conf.
+ * defs.inc: Do not create gpg-agent.conf
+ (GNUPGHOME): Check that it is set properly.
+ (GPG_AGENT_INFO): Do not change.
+
2010-05-11 Werner Koch <wk at g10code.com>
* genkey1024.test: Use GPG macro.
Modified: branches/STABLE-BRANCH-2-0/agent/gpg-agent.c
===================================================================
--- branches/STABLE-BRANCH-2-0/agent/gpg-agent.c 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/agent/gpg-agent.c 2010-05-12 09:49:28 UTC (rev 5336)
@@ -1660,8 +1660,11 @@
if (kill (parent_pid, 0))
{
shutdown_pending = 2;
- log_info ("parent process died - shutting down\n");
- log_info ("%s %s stopped\n", strusage(11), strusage(13) );
+ if (!opt.quiet)
+ {
+ log_info ("parent process died - shutting down\n");
+ log_info ("%s %s stopped\n", strusage(11), strusage(13) );
+ }
cleanup ();
agent_exit (0);
}
Modified: branches/STABLE-BRANCH-2-0/tests/Makefile.am
===================================================================
--- branches/STABLE-BRANCH-2-0/tests/Makefile.am 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/tests/Makefile.am 2010-05-12 09:49:28 UTC (rev 5336)
@@ -46,9 +46,9 @@
samplekeys/cert_g10code_test1.pem \
samplekeys/cert_g10code_theo1.pem
-# We used to run $(testscripts) here but tehse asschk scripts ares not
+# We used to run $(testscripts) here but these asschk scripts are not
# completely reliable in all enviromnets and thus we better disable
-# them. The tests are anyway way to minimal. We will eventually
+# them. The tests are anyway way too minimal. We will eventually
# write new tests based on gpg-connect-agent which has a full fledged
# script language and thus makes it far easier to write tests than to
# use the low--level asschk stuff.
Modified: branches/STABLE-BRANCH-2-0/tests/inittests
===================================================================
--- branches/STABLE-BRANCH-2-0/tests/inittests 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/tests/inittests 2010-05-12 09:49:28 UTC (rev 5336)
@@ -73,7 +73,7 @@
done
# Create the configuration scripts
-# Note, die to an expired test certificate, we need to use
+# Note, due to an expired test certificate, we need to use
# the faked system time option.
cat > gpgsm.conf <<EOF
no-secmem-warning
Modified: branches/STABLE-BRANCH-2-0/tests/openpgp/Makefile.am
===================================================================
--- branches/STABLE-BRANCH-2-0/tests/openpgp/Makefile.am 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/tests/openpgp/Makefile.am 2010-05-12 09:49:28 UTC (rev 5336)
@@ -23,6 +23,11 @@
required_pgms = ../../g10/gpg2 ../../agent/gpg-agent \
../../tools/gpg-connect-agent
+
+TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) GPG_AGENT_INFO= LC_ALL=C \
+ ../../agent/gpg-agent --quiet --daemon sh
+
+
TESTS = version.test mds.test \
decrypt.test decrypt-dsa.test \
sigs.test sigs-dsa.test \
@@ -66,8 +71,10 @@
prepared.stamp: ./pubring.gpg ./secring.gpg ./plain-1 ./plain-2 ./plain-3 \
./pubring.pkr ./secring.skr ./gpg_dearmor $(DATA_FILES)
$(GPG_IMPORT) $(srcdir)/pubdemo.asc
+ cat $(srcdir)/gpg-agent.conf.tmpl > gpg-agent.conf
echo timestamp >./prepared.stamp
+
# We need to depend on a couple of programs so that the tests don't
# start before all programs are built.
./gpg_dearmor: $(required_pgms)
Modified: branches/STABLE-BRANCH-2-0/tests/openpgp/defs.inc
===================================================================
--- branches/STABLE-BRANCH-2-0/tests/openpgp/defs.inc 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/tests/openpgp/defs.inc 2010-05-12 09:49:28 UTC (rev 5336)
@@ -1,6 +1,6 @@
# Definitions for the OpenPGP test scripts -*- sh -*-
# Copyright 1998,1999,2000,2001,2002,2003,2004,2005,2006,
-# 2007 Free Software Foundation, Inc.
+# 2007, 2010 Free Software Foundation, Inc.
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved. This file is
@@ -162,7 +162,7 @@
[ -z "$srcdir" ] && fatal "not called from make"
# Make sure we have a valid option file 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,24 @@
fi
done
-# Always work in the current directory
-GNUPGHOME=`pwd`
-export GNUPGHOME
+# 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
-# 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 "
-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
Modified: branches/STABLE-BRANCH-2-0/tests/openpgp/gpg-agent.conf.tmpl
===================================================================
--- branches/STABLE-BRANCH-2-0/tests/openpgp/gpg-agent.conf.tmpl 2010-05-11 18:00:31 UTC (rev 5335)
+++ branches/STABLE-BRANCH-2-0/tests/openpgp/gpg-agent.conf.tmpl 2010-05-12 09:49:28 UTC (rev 5336)
@@ -1,2 +1,2 @@
-use-standard-socket
+no-use-standard-socket
More information about the Gnupg-commits
mailing list