diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 09:10:20 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-05-17 09:10:20 +1000 |
commit | 7c8b1e72331293b4707dc6f7f68a69e975a3fa70 (patch) | |
tree | 09a6ddb14ec87f1a6829bcda0c8801af3aae9d3d /regress/test-exec.sh | |
parent | 712de4d1100963b11bc618472f95ce36bf7e2ae3 (diff) |
- 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.
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r-- | regress/test-exec.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index aa4e6e5c0..29dac3de9 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: test-exec.sh,v 1.37 2010/02/24 06:21:56 djm Exp $ | 1 | # $OpenBSD: test-exec.sh,v 1.38 2013/03/23 11:09:43 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | #SUDO=sudo | 4 | #SUDO=sudo |
@@ -309,9 +309,11 @@ rm -f $OBJ/known_hosts $OBJ/authorized_keys_$USER | |||
309 | trace "generate keys" | 309 | trace "generate keys" |
310 | for t in rsa rsa1; do | 310 | for t in rsa rsa1; do |
311 | # generate user key | 311 | # generate user key |
312 | rm -f $OBJ/$t | 312 | if [ ! -f $OBJ/$t ] || [ ${SSHKEYGEN} -nt $OBJ/$t ]; then |
313 | ${SSHKEYGEN} -b 1024 -q -N '' -t $t -f $OBJ/$t ||\ | 313 | rm -f $OBJ/$t |
314 | fail "ssh-keygen for $t failed" | 314 | ${SSHKEYGEN} -q -N '' -t $t -f $OBJ/$t ||\ |
315 | fail "ssh-keygen for $t failed" | ||
316 | fi | ||
315 | 317 | ||
316 | # known hosts file for client | 318 | # known hosts file for client |
317 | ( | 319 | ( |