r16330: Show number of succeeded, failed and skipped tests and success rate at the
authorJelmer Vernooij <jelmer@samba.org>
Sat, 17 Jun 2006 00:56:17 +0000 (00:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:09:10 +0000 (14:09 -0500)
end of a smbtorture run.
(This used to be commit 745f3d544bb1158c7c0001d36181916cd932bc08)

source4/torture/smbtorture.c

index 6d1bd1cca94a72f7af218016c07db588511cf8fb..baa8965c7445d783540cdbecae32f17dc703f264 100644 (file)
@@ -530,11 +530,19 @@ const static struct torture_ui_ops quiet_ui_ops = {
        if (argc_new == 0) {
                printf("You must specify a test to run, or 'ALL'\n");
        } else {
+               int total;
+               double rate;
                for (i=2;i<argc_new;i++) {
                        if (!run_test(torture, argv_new[i])) {
                                correct = False;
                        }
                }
+
+               total = torture->skipped+torture->success+torture->failed;
+               rate = ((total - torture->failed) * (100.0 / total));
+               printf("Tests: %d, Errors: %d, Skipped: %d. Success rate: %.2f%%\n",
+                          total, torture->failed, torture->skipped,
+                          rate);
        }
 
        talloc_free(torture);