diff options
author | Darren Tucker <dtucker@zip.com.au> | 2013-11-09 16:55:03 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2013-11-09 16:55:03 +1100 |
commit | 6e2fe81f926d995bae4be4a6b5b3c88c1c525187 (patch) | |
tree | a870353aa0a536bd9f92ccc2c5b633c4e4b1256a /regress/test-exec.sh | |
parent | aff7ef1bb8b7c1eeb1f4812129091c5adbf51848 (diff) |
- dtucker@cvs.openbsd.org 2013/11/09 05:41:34
[regress/test-exec.sh regress/rekey.sh]
Use smaller test data files to speed up tests. Grow test datafiles
where necessary for a specific test.
Diffstat (limited to 'regress/test-exec.sh')
-rw-r--r-- | regress/test-exec.sh | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/regress/test-exec.sh b/regress/test-exec.sh index eee446264..aac8aa5c2 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: test-exec.sh,v 1.46 2013/06/21 02:26:26 djm Exp $ | 1 | # $OpenBSD: test-exec.sh,v 1.47 2013/11/09 05:41:34 dtucker Exp $ |
2 | # Placed in the Public Domain. | 2 | # Placed in the Public Domain. |
3 | 3 | ||
4 | #SUDO=sudo | 4 | #SUDO=sudo |
@@ -133,7 +133,12 @@ fi | |||
133 | # Path to sshd must be absolute for rexec | 133 | # Path to sshd must be absolute for rexec |
134 | case "$SSHD" in | 134 | case "$SSHD" in |
135 | /*) ;; | 135 | /*) ;; |
136 | *) SSHD=`which sshd` ;; | 136 | *) SSHD=`which $SSHD` ;; |
137 | esac | ||
138 | |||
139 | case "$SSHAGENT" in | ||
140 | /*) ;; | ||
141 | *) SSHAGENT=`which $SSHAGENT` ;; | ||
137 | esac | 142 | esac |
138 | 143 | ||
139 | # Logfiles. | 144 | # Logfiles. |
@@ -166,14 +171,22 @@ SSH="$SSHLOGWRAP" | |||
166 | 171 | ||
167 | # Some test data. We make a copy because some tests will overwrite it. | 172 | # Some test data. We make a copy because some tests will overwrite it. |
168 | # The tests may assume that $DATA exists and is writable and $COPY does | 173 | # The tests may assume that $DATA exists and is writable and $COPY does |
169 | # not exist. | 174 | # not exist. Tests requiring larger data files can call increase_datafile_size |
175 | # [kbytes] to ensure the file is at least that large. | ||
170 | DATANAME=data | 176 | DATANAME=data |
171 | DATA=$OBJ/${DATANAME} | 177 | DATA=$OBJ/${DATANAME} |
172 | cat $SSHD $SSHD $SSHD $SSHD >${DATA} | 178 | cat ${SSHAGENT} >${DATA} |
173 | chmod u+w ${DATA} | 179 | chmod u+w ${DATA} |
174 | COPY=$OBJ/copy | 180 | COPY=$OBJ/copy |
175 | rm -f ${COPY} | 181 | rm -f ${COPY} |
176 | 182 | ||
183 | increase_datafile_size() | ||
184 | { | ||
185 | while [ `du -k ${DATA} | cut -f1` -lt $1 ]; do | ||
186 | cat ${SSHAGENT} >>${DATA} | ||
187 | done | ||
188 | } | ||
189 | |||
177 | # these should be used in tests | 190 | # these should be used in tests |
178 | export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP | 191 | export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP |
179 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP | 192 | #echo $SSH $SSHD $SSHAGENT $SSHADD $SSHKEYGEN $SSHKEYSCAN $SFTP $SFTPSERVER $SCP |