Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libSDL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
libSDL
Commits
5b6be642
Commit
5b6be642
authored
May 30, 2011
by
Markus Kauppila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed doxygen warnings
parent
bc147958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
runner.c
test/test-automation/runner.c
+17
-10
No files found.
test/test-automation/runner.c
View file @
5b6be642
...
@@ -35,7 +35,9 @@ typedef int (*TestCase)(void *arg);
...
@@ -35,7 +35,9 @@ typedef int (*TestCase)(void *arg);
*
*
* \return Loaded test suite
* \return Loaded test suite
*/
*/
void
*
LoadTestSuite
()
{
void
*
LoadTestSuite
()
{
#if defined(linux) || defined( __linux)
#if defined(linux) || defined( __linux)
char
*
libName
=
"tests/libtest.so"
;
char
*
libName
=
"tests/libtest.so"
;
#else
#else
...
@@ -57,7 +59,9 @@ void *LoadTestSuite() {
...
@@ -57,7 +59,9 @@ void *LoadTestSuite() {
* \param library Previously loaded dynamic library AKA test suite
* \param library Previously loaded dynamic library AKA test suite
* \return Loaded TestCaseReferences
* \return Loaded TestCaseReferences
*/
*/
TestCaseReference
**
QueryTestCases
(
void
*
library
)
{
TestCaseReference
**
QueryTestCases
(
void
*
library
)
{
TestCaseReference
**
(
*
suite
)(
void
);
TestCaseReference
**
(
*
suite
)(
void
);
suite
=
(
TestCaseReference
**
(
*
)(
void
))
SDL_LoadFunction
(
library
,
"QueryTestSuite"
);
suite
=
(
TestCaseReference
**
(
*
)(
void
))
SDL_LoadFunction
(
library
,
"QueryTestSuite"
);
...
@@ -78,12 +82,14 @@ TestCaseReference **QueryTestCases(void *library) {
...
@@ -78,12 +82,14 @@ TestCaseReference **QueryTestCases(void *library) {
/*!
/*!
* Loads test case from a test suite
* Loads test case from a test suite
*
*
* \param
T
est suite
* \param
suite a t
est suite
* \testName Name of the test that is going to be loaded
* \
param
testName Name of the test that is going to be loaded
*
*
* \return loaded test
* \return loaded test
*/
*/
TestCase
LoadTestCase
(
void
*
suite
,
char
*
testName
)
{
TestCase
LoadTestCase
(
void
*
suite
,
char
*
testName
)
{
TestCase
test
=
(
int
(
*
)(
void
*
))
SDL_LoadFunction
(
suite
,
testName
);
TestCase
test
=
(
int
(
*
)(
void
*
))
SDL_LoadFunction
(
suite
,
testName
);
if
(
test
==
NULL
)
{
if
(
test
==
NULL
)
{
printf
(
"Loading test failed, tests == NULL
\n
"
);
printf
(
"Loading test failed, tests == NULL
\n
"
);
...
@@ -94,7 +100,6 @@ TestCase LoadTestCase(void *suite, char *testName) {
...
@@ -94,7 +100,6 @@ TestCase LoadTestCase(void *suite, char *testName) {
}
}
/*!
/*!
* If using out-of-proc execution of tests. This function
* If using out-of-proc execution of tests. This function
* will handle the return value of the child process
* will handle the return value of the child process
...
@@ -105,8 +110,10 @@ TestCase LoadTestCase(void *suite, char *testName) {
...
@@ -105,8 +110,10 @@ TestCase LoadTestCase(void *suite, char *testName) {
*
*
* \return 0 if test case succeeded, 1 otherwise
* \return 0 if test case succeeded, 1 otherwise
*/
*/
int
HandleTestReturnValue
(
int
stat_lock
)
{
int
//! \todo rename to: HandleChildReturn Value
HandleTestReturnValue
(
int
stat_lock
)
{
//! \todo rename to: HandleChildProcessReturnValue?
int
returnValue
=
-
1
;
int
returnValue
=
-
1
;
if
(
WIFEXITED
(
stat_lock
))
{
if
(
WIFEXITED
(
stat_lock
))
{
...
@@ -122,7 +129,7 @@ int HandleTestReturnValue(int stat_lock) {
...
@@ -122,7 +129,7 @@ int HandleTestReturnValue(int stat_lock) {
}
}
//!< Flag for executing tests in-process
//!< Flag for executing tests in-process
int
execute_inproc
=
0
;
static
int
execute_inproc
=
0
;
/*!
/*!
* Parse command line arguments
* Parse command line arguments
...
@@ -145,7 +152,7 @@ main(int argc, char *argv[])
...
@@ -145,7 +152,7 @@ main(int argc, char *argv[])
{
{
ParseOptions
(
argc
,
argv
);
ParseOptions
(
argc
,
argv
);
// print: Testing again
ts
SDL version fuu (rev: bar) if verbose == true
// print: Testing again
st
SDL version fuu (rev: bar) if verbose == true
int
failureCount
=
0
,
passCount
=
0
;
int
failureCount
=
0
,
passCount
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment