Making the tests self-contained wrt config file and lib.sh creating test scratch dir.
This commit is contained in:
parent
b5b96cde0c
commit
cefaf4717f
12 changed files with 256 additions and 78 deletions
|
|
@ -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]:"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue