This commit is contained in:
Olof Hagsand 2019-02-28 13:11:22 +01:00
commit a529546c88
45 changed files with 1913 additions and 708 deletions

View file

@ -37,9 +37,12 @@ if [ -x ./site.sh ]; then
done
fi
# Running test number
# Test number from start
: ${testnr:=0}
# Test number in this test
testi=0
# Single test. Set by "new"
testname=
@ -59,6 +62,10 @@ testname=
# If set to 0, override starting of clixon_backend in test (you bring your own)
: ${BE:=1}
# If BE is set, some tests have a user timeout to show which params to set
# for starting a backend
: ${BETIMEOUT:=10}
# If set, enable debugging (of backend)
: ${DBG:=0}
@ -95,7 +102,12 @@ dir=/var/tmp/$0
if [ ! -d $dir ]; then
mkdir $dir
fi
rm -rf $dir/*
# If we bring our own backend BE=0 (it is already started),the backend may
# have created some files (eg unix socket) in $dir and therefore cannot
# be deleted
if [ $BE -ne 0 ]; then
rm -rf $dir/*
fi
# error and exit,
# arg1: expected
@ -178,8 +190,9 @@ new(){
checkvalgrind
fi
testnr=`expr $testnr + 1`
testi=`expr $testi + 1`
testname=$1
>&2 echo "Test$testnr [$1]"
>&2 echo "Test $testi($testnr) [$1]"
}
# clixon command tester.