test/dm: clear unit test failure count each run
authorStephen Warren <swarren@nvidia.com>
Thu, 28 Jan 2016 06:57:46 +0000 (23:57 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 29 Jan 2016 04:01:24 +0000 (21:01 -0700)
The ut command prints a test failure count each time it is executed.
This is stored in a global variable which is never reset. Consequently,
the printed failure count accumulates across runs. Fix this by clearing
the counter each time "ut" is invoked.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
test/dm/test-main.c

index 91bdda8..f2e0048 100644 (file)
@@ -81,6 +81,8 @@ static int dm_test_main(const char *test_name)
        struct unit_test *test;
        int run_count;
 
+       uts->fail_count = 0;
+
        /*
         * If we have no device tree, or it only has a root node, then these
         * tests clearly aren't going to work...