Commit b214eda4 authored by Martin Pool's avatar Martin Pool

Clean scratch directory between each test run.

parent 0771727d
...@@ -160,16 +160,18 @@ missing=0 ...@@ -160,16 +160,18 @@ missing=0
passed=0 passed=0
failed=0 failed=0
scratchdir=./testtmp scratchdir="`cd ./testtmp && pwd`"
[ -d "$scratchdir" ] && rm -r "$scratchdir"
mkdir "$scratchdir"
scratchdir=`cd $scratchdir && pwd`
echo " scratchdir=$scratchdir" echo " scratchdir=$scratchdir"
suitedir="$srcdir/testsuite" suitedir="$srcdir/testsuite"
export scratchdir suitedir export scratchdir suitedir
clean_scratch() {
[ -d "$scratchdir" ] && rm -rf "$scratchdir"
mkdir "$scratchdir"
}
if [ "x$whichtests" = x ] if [ "x$whichtests" = x ]
then then
whichtests="*.test" whichtests="*.test"
...@@ -180,6 +182,7 @@ do ...@@ -180,6 +182,7 @@ do
testbase=`echo $testscript | sed 's!.*/!!'` testbase=`echo $testscript | sed 's!.*/!!'`
echo "----- $testbase starting" echo "----- $testbase starting"
clean_scratch
if sh $RUNSHFLAGS "$testscript" if sh $RUNSHFLAGS "$testscript"
then then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment