]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Correct number of failed suites
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 16 Jul 2010 21:01:39 +0000 (23:01 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 17 Jul 2010 10:07:03 +0000 (12:07 +0200)
test/framework.c

index b079d41d6a60b365d0f195157b2dab4e3c379260..bc6436f7e7dc2fdca42f97ae6d7dd22cbc05d393 100644 (file)
@@ -64,9 +64,13 @@ cct_run(suite_fn *suites, int verbose_output)
 
        for (suite = suites; *suite; suite++) {
                unsigned test_index = 0;
-               do {
+               while (1) {
                        test_index = (*suite)(test_index + 1);
-               } while (test_index != 0);
+                       if (test_index == 0) {
+                               break;
+                       }
+                       ++failed_suites;
+               }
                --passed_tests; /* Fix false increase in first TEST expansion. */
        }