[test-exec.sh]
     Only regenerate host keys if they don't exist or if ssh-keygen has changed
     since they were.  Reduces test runtime by 5-30% depending on machine
     speed.
This commit is contained in:
Darren Tucker 2013-05-17 09:10:20 +10:00
parent 712de4d110
commit 7c8b1e7233
2 changed files with 11 additions and 4 deletions

View File

@ -3,6 +3,11 @@
- djm@cvs.openbsd.org 2013/03/07 00:20:34
[regress/proxy-connect.sh]
repeat test with a style appended to the username
- dtucker@cvs.openbsd.org 2013/03/23 11:09:43
[test-exec.sh]
Only regenerate host keys if they don't exist or if ssh-keygen has changed
since they were. Reduces test runtime by 5-30% depending on machine
speed.
20130516
- (djm) [contrib/ssh-copy-id] Fix bug that could cause "rm *" to be

View File

@ -1,4 +1,4 @@
# $OpenBSD: test-exec.sh,v 1.37 2010/02/24 06:21:56 djm Exp $
# $OpenBSD: test-exec.sh,v 1.38 2013/03/23 11:09:43 dtucker Exp $
# Placed in the Public Domain.
#SUDO=sudo
@ -309,9 +309,11 @@ rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER
trace "generate keys"
for t in rsa rsa1; do
# generate user key
if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN} -nt $OBJ/$t ]; then
rm -f $OBJ/$t
${SSHKEYGEN} -b 1024 -q -N '' -t $t -f $OBJ/$t ||\
${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\
fail "ssh-keygen for $t failed"
fi
# known hosts file for client
(