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