test.c: Fix too sticky unit test failed status.

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
This commit is contained in:
Richard Mudgett
2013-12-13 20:06:53 +00:00
parent 95795aa36b
commit 6ee1da4b52

View File

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