Making the tests self-contained wrt config file and lib.sh creating test scratch dir.

This commit is contained in:
Olof hagsand 2018-01-07 17:56:33 +01:00
parent b5b96cde0c
commit cefaf4717f
12 changed files with 256 additions and 78 deletions

View file

@ -1,7 +1,16 @@
#!/bin/bash
# Define test functions.
# Create working dir as variable "dir"
testnr=0
testname=
dir=/var/tmp/$0
if [ ! -d $dir ]; then
mkdir $dir
fi
rm -rf $dir/*
# error and exit, arg is optional extra errmsg
err(){
echo "Error in Test$testnr [$testname]:"