Dali 3D User Interface Engine
Classes | Typedefs | Enumerations | Functions
TestHarness Namespace Reference

Classes

struct  TestCase
 

Typedefs

typedef std::map< int, TestCaseRunningTestCases
 

Enumerations

enum  ExitStatus {
  EXIT_STATUS_TESTCASE_SUCCEEDED, EXIT_STATUS_TESTCASE_FAILED, EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED,
  EXIT_STATUS_WAITPID_FAILED, EXIT_STATUS_BAD_ARGUMENT, EXIT_STATUS_TESTCASE_NOT_FOUND, EXIT_STATUS_TESTCASE_SUCCEEDED,
  EXIT_STATUS_TESTCASE_FAILED, EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED, EXIT_STATUS_WAITPID_FAILED,
  EXIT_STATUS_BAD_ARGUMENT, EXIT_STATUS_TESTCASE_NOT_FOUND, EXIT_STATUS_TESTCASE_SUCCEEDED, EXIT_STATUS_TESTCASE_FAILED,
  EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED, EXIT_STATUS_WAITPID_FAILED, EXIT_STATUS_BAD_ARGUMENT,
  EXIT_STATUS_TESTCASE_NOT_FOUND
}
 
enum  ExitStatus {
  EXIT_STATUS_TESTCASE_SUCCEEDED, EXIT_STATUS_TESTCASE_FAILED, EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED,
  EXIT_STATUS_WAITPID_FAILED, EXIT_STATUS_BAD_ARGUMENT, EXIT_STATUS_TESTCASE_NOT_FOUND, EXIT_STATUS_TESTCASE_SUCCEEDED,
  EXIT_STATUS_TESTCASE_FAILED, EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED, EXIT_STATUS_WAITPID_FAILED,
  EXIT_STATUS_BAD_ARGUMENT, EXIT_STATUS_TESTCASE_NOT_FOUND, EXIT_STATUS_TESTCASE_SUCCEEDED, EXIT_STATUS_TESTCASE_FAILED,
  EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED, EXIT_STATUS_WAITPID_FAILED, EXIT_STATUS_BAD_ARGUMENT,
  EXIT_STATUS_TESTCASE_NOT_FOUND
}
 
enum  ExitStatus {
  EXIT_STATUS_TESTCASE_SUCCEEDED, EXIT_STATUS_TESTCASE_FAILED, EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED,
  EXIT_STATUS_WAITPID_FAILED, EXIT_STATUS_BAD_ARGUMENT, EXIT_STATUS_TESTCASE_NOT_FOUND, EXIT_STATUS_TESTCASE_SUCCEEDED,
  EXIT_STATUS_TESTCASE_FAILED, EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED, EXIT_STATUS_WAITPID_FAILED,
  EXIT_STATUS_BAD_ARGUMENT, EXIT_STATUS_TESTCASE_NOT_FOUND, EXIT_STATUS_TESTCASE_SUCCEEDED, EXIT_STATUS_TESTCASE_FAILED,
  EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_FORK_FAILED, EXIT_STATUS_WAITPID_FAILED, EXIT_STATUS_BAD_ARGUMENT,
  EXIT_STATUS_TESTCASE_NOT_FOUND
}
 

Functions

const char * basename (const char *path)
 
int RunTestCase (struct::testcase_s &testCase)
 
int RunTestCaseInChildProcess (struct::testcase_s &testCase, bool suppressOutput)
 
void OutputStatistics (const char *processName, int numPasses, int numFailures)
 
int RunAll (const char *processName,::testcase tc_array[])
 
int RunAllInParallel (const char *processName,::testcase tc_array[], bool reRunFailed)
 
int FindAndRunTestCase (::testcase tc_array[], const char *testCaseName)
 Find the named test case in the given array, and run it. More...
 
void Usage (const char *program)
 Display usage instructions for this program. More...
 
const int MAX_NUM_CHILDREN (16)
 
int RunTestCase (struct testcase_s &testCase)
 Run a test case. More...
 
int RunAllInParallel (const char *processName, testcase tc_array[], bool reRunFailed)
 Run all test cases in parallel. More...
 
int RunAll (const char *processName, testcase tc_array[])
 Run all test cases in serial. More...
 

Typedef Documentation

typedef std::map< int, TestCase > TestHarness::RunningTestCases

Definition at line 30 of file test-harness.cpp.

Enumeration Type Documentation

Enumerator
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 

Definition at line 26 of file test-harness.h.

Enumerator
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 

Definition at line 26 of file test-harness.h.

Enumerator
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 
EXIT_STATUS_TESTCASE_SUCCEEDED 
EXIT_STATUS_TESTCASE_FAILED 
EXIT_STATUS_TESTCASE_ABORTED 
EXIT_STATUS_FORK_FAILED 
EXIT_STATUS_WAITPID_FAILED 
EXIT_STATUS_BAD_ARGUMENT 
EXIT_STATUS_TESTCASE_NOT_FOUND 

Definition at line 26 of file test-harness.h.

Function Documentation

const char * TestHarness::basename ( const char *  path)

Definition at line 32 of file test-harness.cpp.

Referenced by OutputStatistics().

Here is the caller graph for this function:

int TestHarness::FindAndRunTestCase ( ::testcase  tc_array[],
const char *  testCaseName 
)

Find the named test case in the given array, and run it.

Parameters
[in]tc_arrayThe array of auto-generated testkit-lite test cases
[in]testCaseNamethe name of the test case to run
Returns
0 on success

Definition at line 311 of file test-harness.cpp.

References EXIT_STATUS_TESTCASE_NOT_FOUND, testcase_s::name, and RunTestCase().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

const int TestHarness::MAX_NUM_CHILDREN ( 16  )

Referenced by RunAllInParallel().

Here is the caller graph for this function:

void TestHarness::OutputStatistics ( const char *  processName,
int  numPasses,
int  numFailures 
)

Definition at line 144 of file test-harness.cpp.

References basename().

Referenced by RunAll(), and RunAllInParallel().

Here is the call graph for this function:

Here is the caller graph for this function:

int TestHarness::RunAll ( const char *  processName,
testcase  tc_array[] 
)

Run all test cases in serial.

Parameters
[in]processNameThe name of this process
[in]tc_arrayThe array of auto-generated testkit-lite test cases
Returns
0 on success
int TestHarness::RunAll ( const char *  processName,
::testcase  tc_array[] 
)

Definition at line 171 of file test-harness.cpp.

References testcase_s::name, OutputStatistics(), and RunTestCaseInChildProcess().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int TestHarness::RunAllInParallel ( const char *  processName,
testcase  tc_array[],
bool  reRunFailed 
)

Run all test cases in parallel.

Parameters
[in]processNameThe name of this process
[in]tc_arrayThe array of auto-generated testkit-lite test cases
[in]reRunFailedTrue if failed test cases should be re-run
Returns
0 on success
int TestHarness::RunAllInParallel ( const char *  processName,
::testcase  tc_array[],
bool  reRunFailed 
)

Definition at line 196 of file test-harness.cpp.

References EXIT_STATUS_FORK_FAILED, EXIT_STATUS_WAITPID_FAILED, MAX_NUM_CHILDREN(), OutputStatistics(), RunTestCase(), and RunTestCaseInChildProcess().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int TestHarness::RunTestCase ( struct::testcase_s &  testCase)

Definition at line 44 of file test-harness.cpp.

References testcase_s::cleanup, EXIT_STATUS_TESTCASE_FAILED, testcase_s::function, and testcase_s::startup.

Referenced by FindAndRunTestCase(), RunAllInParallel(), and RunTestCaseInChildProcess().

Here is the caller graph for this function:

int TestHarness::RunTestCase ( struct testcase_s testCase)

Run a test case.

Parameters
[in]testCaseThe Testkit-lite test case to run
int TestHarness::RunTestCaseInChildProcess ( struct::testcase_s &  testCase,
bool  suppressOutput 
)

Definition at line 65 of file test-harness.cpp.

References EXIT_STATUS_FORK_FAILED, EXIT_STATUS_TESTCASE_ABORTED, EXIT_STATUS_TESTCASE_FAILED, EXIT_STATUS_WAITPID_FAILED, testcase_s::name, and RunTestCase().

Referenced by RunAll(), and RunAllInParallel().

Here is the call graph for this function:

Here is the caller graph for this function:

void TestHarness::Usage ( const char *  program)

Display usage instructions for this program.

Parameters
[in]programThe name of this program

Definition at line 327 of file test-harness.cpp.

Referenced by main().

Here is the caller graph for this function:

Dali Docs Home
Read more about Dali