summaryrefslogtreecommitdiff
path: root/runtests.sh
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-12-14 01:52:43 +0000
committerMartin Pool <mbp@samba.org>2001-12-14 01:52:43 +0000
commitb214eda4f077515f328802cd8f6b0b48aaff661c (patch)
treebcf410bfc6b810a0995544817ac5b3ecf3182ff2 /runtests.sh
parent0771727d41929db4e7e592f85a9691ca473e6251 (diff)
downloadrsync-b214eda4f077515f328802cd8f6b0b48aaff661c.tar.gz
rsync-b214eda4f077515f328802cd8f6b0b48aaff661c.tar.bz2
rsync-b214eda4f077515f328802cd8f6b0b48aaff661c.zip
Clean scratch directory between each test run.
Diffstat (limited to 'runtests.sh')
-rwxr-xr-xruntests.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/runtests.sh b/runtests.sh
index 8c3222f7..afa66f44 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -160,16 +160,18 @@ missing=0
passed=0
failed=0
-scratchdir=./testtmp
-[ -d "$scratchdir" ] && rm -r "$scratchdir"
-mkdir "$scratchdir"
-scratchdir=`cd $scratchdir && pwd`
+scratchdir="`cd ./testtmp && pwd`"
echo " scratchdir=$scratchdir"
suitedir="$srcdir/testsuite"
export scratchdir suitedir
+clean_scratch() {
+ [ -d "$scratchdir" ] && rm -rf "$scratchdir"
+ mkdir "$scratchdir"
+}
+
if [ "x$whichtests" = x ]
then
whichtests="*.test"
@@ -180,6 +182,7 @@ do
testbase=`echo $testscript | sed 's!.*/!!'`
echo "----- $testbase starting"
+ clean_scratch
if sh $RUNSHFLAGS "$testscript"
then