testrunner works when compile without ENABLE_TESTS

testrunner works when compile without ENABLE_TESTS
This commit is contained in:
redPanther 2016-09-07 22:27:43 +02:00 committed by GitHub
parent 2beccb0912
commit 359559956c

View File

@ -2,6 +2,7 @@
STATS_FAILED=0
STATS_SUCCESS=0
STATS_SKIPED=0
STATS_TOTAL=0
@ -9,6 +10,12 @@ STATS_TOTAL=0
function exec_test()
{
local test_name="$1"
if [ ! -e "$2" ]
then
echo "skip test: '$test_name'"
(( STATS_SKIPED++ ))
return
fi
shift
(( STATS_TOTAL++ ))
echo "execute test: '$test_name'"
@ -45,6 +52,7 @@ echo "TEST SUMMARY"
echo "============"
echo " total: $STATS_TOTAL"
echo " success: $STATS_SUCCESS"
echo " skiped: $STATS_SKIPED"
echo " failed: $STATS_FAILED"
sleep 2