tests: Always tally the number of passed/failed tests
authorMartin Schwenke <martin@meltin.net>
Mon, 22 Jul 2013 10:11:58 +0000 (20:11 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Mon, 29 Jul 2013 05:49:23 +0000 (15:49 +1000)
Regardless of whether a summary is being printed!

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/scripts/run_tests

index 719a16e52a4e658f1f853c389a77f8dd3275c358..171e8197f72b9ebd4412397b5c8d3fda3fa837d0 100755 (executable)
@@ -175,13 +175,16 @@ run_one_test ()
 
     ctdb_test_run "$_f" | tee "$tf" | show_progress
     status=$?
+    if [ $status -eq 0 ] ; then
+       tests_passed=$(($tests_passed + 1))
+    else
+       tests_failed=$(($tests_failed + 1))
+    fi
     if $with_summary ; then
        if [ $status -eq 0 ] ; then
-           tests_passed=$(($tests_passed + 1))
            _t=" PASSED "
        else
            _t="*FAILED*"
-           tests_failed=$(($tests_failed + 1))
        fi
        if $with_desc ; then
            desc=$(tail -n +4 $tf | head -n 1)