2019-04-21 09:34:17 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-04-21 11:45:51 +00:00
|
|
|
#### $$VERSION$$ 0.70-dev-21-gd4cd756
|
2019-04-21 09:34:17 +00:00
|
|
|
|
|
|
|
# common variables
|
|
|
|
export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME
|
|
|
|
TESTME="$(basename "$0")"
|
|
|
|
DIRME="$(pwd)"
|
|
|
|
TESTDIR="$1"
|
|
|
|
LOGFILE="${TESTDIR}/${TESTME}.log"
|
|
|
|
REFDIR="${TESTME%.sh}"
|
|
|
|
TESTNAME="${REFDIR//-/ }"
|
|
|
|
|
|
|
|
# common filenames
|
|
|
|
export TOKENFILE ACLFILE COUNTFILE ADMINFILE
|
|
|
|
TOKENFILE="token"
|
|
|
|
ACLFILE="botacl"
|
|
|
|
COUNTFILE="count"
|
|
|
|
ADMINFILE="botadmin"
|
|
|
|
|
|
|
|
# SUCCESS NOSUCCES
|
|
|
|
export SUCCESS NOSUCCESS
|
|
|
|
SUCCESS=" OK"
|
|
|
|
NOSUCCESS=" FAILED!"
|
|
|
|
|
|
|
|
echo "Running ${TESTNAME#? } ..."
|
|
|
|
echo "............................"
|
|
|
|
[ "${TESTDIR}" = "" ] && echo "${NOSUCCESS} not called from testsuite, exit" && exit 1
|
|
|
|
|
|
|
|
# reset env for test
|
|
|
|
unset IFS; set -f
|
|
|
|
export TERM=""
|
|
|
|
|