t/zbd/test-zbd-support: Report a test summary when finished
authorBart Van Assche <bvanassche@acm.org>
Fri, 28 Sep 2018 21:51:31 +0000 (14:51 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 29 Sep 2018 21:16:23 +0000 (15:16 -0600)
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/zbd/test-zbd-support

index fd30f5c..2d72791 100755 (executable)
@@ -801,18 +801,26 @@ fi
 
 logfile=$0.log
 
+passed=0
+failed=0
 rc=0
 for test_number in "${tests[@]}"; do
     rm -f "${logfile}.${test_number}"
     echo -n "Running test $test_number ... "
     if eval "test$test_number"; then
        status="PASS"
+       ((passed++))
     else
        status="FAIL"
+       ((failed++))
        rc=1
     fi
     echo "$status"
     echo "$status" >> "${logfile}.${test_number}"
 done
 
+echo "$passed tests passed"
+if [ $failed -gt 0 ]; then
+    echo " and $failed tests failed"
+fi
 exit $rc