]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
test.c: Fix too sticky unit test failed status.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 13 Dec 2013 20:06:53 +0000 (20:06 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 13 Dec 2013 20:06:53 +0000 (20:06 +0000)
Rerunning a failed unit test after loading any required modules should
allow the test to report a pass status if it now passes.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403782 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/test.c

index 94713e0e75c250bbfe6f04992b372535ff7c12eb..170bba6582bda018ecd53e2e55f4dbd6e71a3e30 100644 (file)
@@ -250,6 +250,7 @@ static void test_execute(struct ast_test *test)
                test->state = AST_TEST_FAIL;
                goto exit;
        }
+       test->state = AST_TEST_NOT_RUN;
        result = test->cb(&test->info, TEST_EXECUTE, test);
        if (test->state != AST_TEST_FAIL) {
                test->state = result;