From: Joel Rosdahl Date: Fri, 16 Jul 2010 21:01:39 +0000 (+0200) Subject: Correct number of failed suites X-Git-Tag: v3.1~164 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=670670ed714bbe91ed8575831ccc34be8860612b;p=thirdparty%2Fccache.git Correct number of failed suites --- diff --git a/test/framework.c b/test/framework.c index b079d41d6..bc6436f7e 100644 --- a/test/framework.c +++ b/test/framework.c @@ -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. */ }