1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Update tests.

This commit is contained in:
Werner Koch 2010-05-11 18:00:31 +00:00
parent b9f2c0daaf
commit f5551672fb
10 changed files with 106 additions and 42 deletions

View file

@ -1,3 +1,13 @@
2010-05-11 Werner Koch <wk@g10code.com>
* genkey1024.test: Use GPG macro.
* gpg-agent.conf.tmpl: New.
* defs.inc: Create gpg-agent.conf
(GNUPGHOME): Set and export.
(GPG_AGENT_INFO): Unset.
* Makefile.am (CLEANFILES): Add S.gpg-agent
2010-05-07 Werner Koch <wk@g10code.com>
* import.test: Add test case for bug#1223.
@ -48,7 +58,7 @@
we support. This is safer than the previous setup which could
hide that some ciphers weren't being tested. Plus, this
automatically tests any new ciphers libgcrypt supports.
(all_hash_algos): New.
(all_hash_algos): New.
* sigs.test: Use it here, and also test with >=160 bit hashes for
DSA2.
* conventional.test, encrypt.test, encrypt-dsa.test,

View file

@ -40,16 +40,20 @@ TESTS = version.test mds.test \
TEST_FILES = pubring.asc secring.asc plain-1o.asc plain-2o.asc plain-3o.asc \
plain-1.asc plain-2.asc plain-3.asc plain-1-pgp.asc \
pubring.pkr.asc secring.skr.asc secdemo.asc pubdemo.asc \
gpg.conf.tmpl bug537-test.data.asc bug894-test.asc \
gpg.conf.tmpl gpg-agent.conf.tmpl \
bug537-test.data.asc bug894-test.asc \
bug1223-good.asc bug1223-bogus.asc
DATA_FILES = data-500 data-9000 data-32000 data-80000 plain-large
EXTRA_DIST = defs.inc $(TESTS) $(TEST_FILES) \
mkdemodirs signdemokey
# Note that removing S.gpg-agent forces a running gpg-agent to
# terminate after some time.
CLEANFILES = prepared.stamp x y yy z out err $(DATA_FILES) \
plain-1 plain-2 plain-3 trustdb.gpg *.lock .\#lk* \
*.test.log gpg_dearmor gpg.conf \
*.test.log gpg_dearmor gpg.conf gpg-agent.conf S.gpg-agent \
pubring.gpg secring.gpg pubring.pkr secring.skr
DISTCLEANFILES = pubring.gpg~ random_seed

View file

@ -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
GPG="../../g10/gpg2 --no-permission-warning --homedir . "
# 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 "
exec 5>&2 2>${pgmname}.log

View file

@ -10,7 +10,7 @@
. $srcdir/defs.inc || exit 3
../../g10/gpg2 --quiet --batch --debug-quick-random --homedir . --gen-key <<EOF
$GPG --quiet --batch --debug-quick-random --gen-key <<EOF
Key-Type: DSA
Key-Length: 1024
Subkey-Type: ELG
@ -24,7 +24,7 @@ Passphrase: abc
EOF
if have_pubkey_algo "RSA"; then
../../g10/gpg2 --quiet --batch --debug-quick-random --homedir . --gen-key <<EOF
$GPG --quiet --batch --debug-quick-random --gen-key <<EOF
Key-Type: RSA
Key-Length: 1024
Key-Usage: sign,encrypt

View file

@ -0,0 +1,2 @@
use-standard-socket