Commit c383e213 authored by Paul Cammish's avatar Paul Cammish
Browse files

Added totals to results

parent da663b4b
......@@ -167,12 +167,17 @@ TEST_PATH |$TEST_PATH
DEBUG |$DEBUG
"
PASS=0
FAIL=0
ERROR=0
TIMESTAMP="$(date +%s)"
if [ -f "$LOG" ]; then rm "$LOG" ; fi
#_echo "Starting run at $(date ; if [ "$TEST_PATH" != "./tests.d" ] ; then echo -n ", test path: '$TEST_PATH'" ; fi )"
_centre = Starting
TOTAL=$( find $TEST_PATH -type f -executable | wc -l )
for script in $( find $TEST_PATH -type f -executable | sort ) ; do
_echo
_centre - "$script"
......@@ -182,10 +187,13 @@ for script in $( find $TEST_PATH -type f -executable | sort ) ; do
$script > /dev/shm/sympl-tests_stdout 2>&1
exitcode=$?
if [ $exitcode == 0 ] ; then
PASS=$((PASS+1))
_pass
elif [ $exitcode == 1 ]; then
FAIL=$((FAIL+1))
_fail
else
ERROR=$((ERROR+1))
_test_error
fi
rm /dev/shm/sympl-tests_stdout
......@@ -193,6 +201,7 @@ done
_echo
_centre = Summary
_echo "Test run completed at $(date)"
_echo "Passed: $PASS/$TOTAL $( printf %.2f%% "$((10**3 * 100 * $PASS/$TOTAL))e-3" ) Failed: $FAIL Errors: $ERROR"
_centre = "End"
#run-parts tests.d/00-system -a ~/git/sympl-tests/sympl-tests
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment