2016-06-01 20:25:08 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
|
|
|
cd "$(dirname "$(readlink -f "$0")")/tests"
|
2016-06-01 21:20:31 +00:00
|
|
|
let cnt=0
|
2016-06-01 20:25:08 +00:00
|
|
|
|
|
|
|
for i in *.sh; do
|
2016-06-01 21:20:31 +00:00
|
|
|
cnt=$(($cnt + 1))
|
|
|
|
echo -e "\n>> Running test #$cnt \"$i\"\n"
|
2016-06-01 20:25:08 +00:00
|
|
|
./${i}
|
|
|
|
retval=$?
|
|
|
|
if [ $retval != 0 ]; then
|
2016-06-01 21:20:31 +00:00
|
|
|
echo ">> FAILED test #$cnt \"$i\", exit code $retval"
|
2016-06-01 20:25:08 +00:00
|
|
|
exit $retval
|
|
|
|
fi
|
|
|
|
done
|
2016-06-01 21:20:31 +00:00
|
|
|
|
|
|
|
echo ">> All $cnt tests PASSED"
|