clixon/test/all.sh
Olof hagsand 606245ef02 * Added flags to example backend to control its behaviour:
* Start with `-- -r` to run the reset plugin
  * Start with `-- -s` to run the state callback
* Rewrote yang dir load algorithm to follow the algorithm in [FAQ](FAQ(doc/FAQ.md#how-are-yang-files-found) with more precise timestamp checks, etc.
2019-03-18 16:31:34 +01:00

32 lines
547 B
Bash
Executable file

#!/bin/bash
# Run, eg as:
# ./all.sh 2>&1 | tee test.log # break on first test
if [ $# -gt 0 ]; then
echo "usage: $0 # detailed logs and stopon first error"
exit -1
fi
err=0
testnr=0
for test in test_*.sh; do
if [ $testnr != 0 ]; then echo; fi
testfile=$test
. ./$test
errcode=$?
if [ $errcode -ne 0 ]; then
err=1
echo -e "\e[31mError in $test errcode=$errcode"
echo -ne "\e[0m"
exit $errcode
fi
done
if [ $err -eq 0 ]; then
echo OK
else
echo -e "\e[31mError"
echo -ne "\e[0m"
exit -1
fi