From 9546aa3cc87fc83a40768a12fbbceb19496ce129 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 30 Oct 2014 09:55:51 +0100 Subject: tests: Speed up the genkey1024.test by using not so strong random. * agent/gpg-agent.c (oDebugQuickRandom): New. (opts): New option --debug-quick-random. (main): Use new option. * common/asshelp.c (start_new_gpg_agent): Add hack to pass an additional argument for the agent name. * tests/openpgp/defs.inc: Pass --debug-quick-random to the gpg-agent starting parameters. * tests/openpgp/version.test: Ditto. Signed-off-by: Werner Koch --- tests/openpgp/defs.inc | 5 ++--- tests/openpgp/version.test | 5 ++++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/openpgp/defs.inc b/tests/openpgp/defs.inc index b7320d562..941f786bc 100755 --- a/tests/openpgp/defs.inc +++ b/tests/openpgp/defs.inc @@ -244,10 +244,9 @@ for f in gpg.conf gpg-agent.conf ; do case "$f" in gpg.conf) [ -n "${opt_always}" ] && echo "no-auto-check-trustdb" >>"$f" - echo "agent-program $GPG_AGENT" >>"$f" + echo "agent-program ${GPG_AGENT}|--debug-quick-random" >>"$f" echo "allow-weak-digest-algos" >>"$f" - - ;; + ;; gpg-agent.conf) echo "pinentry-program $PINENTRY" >>"$f" ;; diff --git a/tests/openpgp/version.test b/tests/openpgp/version.test index cae8b6840..057bcf018 100755 --- a/tests/openpgp/version.test +++ b/tests/openpgp/version.test @@ -39,9 +39,12 @@ done # create a faked random seed file. Note that we need to set the # agent-program so that gpg-connect-agent is able to start the agent # we are currently testing and not an already installed one. +# The "|--debug-quick-random" is a hack to start gpg-agent with +# that option on the command line. info "Starting the agent" $MKTDATA 600 >random_seed -if $GPG_CONNECT_AGENT -v --agent-program="$GPG_AGENT" /bye; then +if $GPG_CONNECT_AGENT -v \ + --agent-program="${GPG_AGENT}|--debug-quick-random" /bye; then : else error "starting the gpg-agent failed" -- cgit v1.2.3