summaryrefslogtreecommitdiff
path: root/regress/test-exec.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-11-09 16:55:03 +1100
committerDarren Tucker <dtucker@zip.com.au>2013-11-09 16:55:03 +1100
commit6e2fe81f926d995bae4be4a6b5b3c88c1c525187 (patch)
treea870353aa0a536bd9f92ccc2c5b633c4e4b1256a /regress/test-exec.sh
parentaff7ef1bb8b7c1eeb1f4812129091c5adbf51848 (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.sh21
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
134case "$SSHD" in 134case "$SSHD" in
135/*) ;; 135/*) ;;
136*) SSHD=`which sshd` ;; 136*) SSHD=`which $SSHD` ;;
137esac
138
139case "$SSHAGENT" in
140/*) ;;
141*) SSHAGENT=`which $SSHAGENT` ;;
137esac 142esac
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.
170DATANAME=data 176DATANAME=data
171DATA=$OBJ/${DATANAME} 177DATA=$OBJ/${DATANAME}
172cat $SSHD $SSHD $SSHD $SSHD >${DATA} 178cat ${SSHAGENT} >${DATA}
173chmod u+w ${DATA} 179chmod u+w ${DATA}
174COPY=$OBJ/copy 180COPY=$OBJ/copy
175rm -f ${COPY} 181rm -f ${COPY}
176 182
183increase_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
178export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP 191export 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