tm_run_test_case

Langue: en

Version: 367942 (MeeGo - 06/11/10)

Section: 3 (Bibliothèques de fonctions)

NAME

tm_run_test_case - run a test casesfrom MIN test module

SYNOPSIS

#include <test_module_api.h>

int tm_run_test_cases (unsigned intid,const char *cfg_file, TestCaseResult *result);

DESCRIPTION

Every MIN test module must implement tm_run_test_case. MIN test module controller forks a new process for test case execution, which calls this function. The test case result should be stored in TestCaseResult struct.
 typedef enum {
         TP_CRASHED = -2,        /**< Test Process has crashed */
         TP_TIMEOUTED = -1,      /**< Test Process has timeouted */
         TP_PASSED = 0,          /**< Test Process has passed */
         TP_FAILED = 1,          /**< Test Process has failed */
         TP_NC = 2,              /**< Test Process has been not completed */
         /** Test Process has exited because an error occured in the
          *  component under test
          */
         TP_LEAVE = 3
 } TPResult;
 
 struct _TestCaseResult {
         TPResult        result_;
         char            desc_[MaxTestResultDescription];
 };
 

The result_ field contains the result of test case, desc_ can be used to pass additional description of the result.

SEE ALSO

tm_get_test_cases(3)