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
86738f81
Commit
86738f81
authored
May 26, 2011
by
Markus Kauppila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Little fixes here and there.
parent
ff1e17dc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
21 deletions
+18
-21
Makefile.am
test/test-automation/Makefile.am
+2
-1
runner.c
test/test-automation/runner.c
+11
-9
Makefile.am
test/test-automation/tests/Makefile.am
+3
-2
SDL_test.h
test/test-automation/tests/SDL_test.h
+2
-2
test.c
test/test-automation/tests/test.c
+0
-7
No files found.
test/test-automation/Makefile.am
View file @
86738f81
...
...
@@ -9,6 +9,7 @@ runner_LDFLAGS = `sdl-config --libs`
install
:
install-tests
install-tests
:
cp
-f
tests/.libs/
*
.dylib tests/
-
cp
-f
tests/.libs/
*
.dylib tests/ 2> /dev/null
-
cp
-f
tests/.libs/
*
.so tests/ 2> /dev/null
test/test-automation/runner.c
View file @
86738f81
...
...
@@ -91,8 +91,6 @@ int main(int argc, char *argv[]) {
// print: Testing againts SDL version fuu (rev: bar)
int
failureCount
=
0
,
passCount
=
0
;
char
*
testname
=
NULL
;
int
counter
=
0
;
char
*
libName
=
"libtest"
;
...
...
@@ -100,15 +98,19 @@ int main(int argc, char *argv[]) {
void
*
library
=
LoadLibrary
();
TestCaseReference
**
tests
=
QueryTestCases
(
library
);
if
(
tests
==
NULL
)
{
printf
(
"It's null
\n
"
);
}
else
{
printf
(
"It's NOT null
\n
"
);
}
printf
(
"%s name
\n
"
,
tests
[
1
]
->
name
);
TestCaseReference
*
reference
=
NULL
;
int
counter
=
0
;
printf
(
"DEBUG: Starting to run test
\n
"
);
fflush
(
stdout
);
for
(
reference
=
tests
[
counter
];
reference
;
reference
=
tests
[
++
counter
])
{
// segfaults immediately after trying to access name -> out of bounds
// all the values of reference is garbage.
char
*
testname
=
reference
->
name
;
//char *testname = reference; // for some reason this works
for
(
testname
=
tests
[
counter
];
testname
;
testname
=
tests
[
++
counter
])
{
printf
(
"Running %s (in %s):
\n
"
,
testname
,
libName
);
int
childpid
=
fork
();
...
...
test/test-automation/tests/Makefile.am
View file @
86738f81
lib_LTLIBRARIES
=
libtest.la
libtest_la_SOURCES
=
test.c
sdl
_test.c
libtest_la_SOURCES
=
test.c
SDL
_test.c
libtest_la_CLAGS
=
-fPIC
-g
libtest_la_LDFLAGS
=
`
sdl-config
--libs
`
distclean-local
:
rm
*
.dylib
-
rm
*
.dylib
-
rm
*
.so
test/test-automation/tests/SDL_test.h
View file @
86738f81
...
...
@@ -24,10 +24,10 @@
#include <SDL/SDL.h>
typedef
struct
TestCaseReference
{
int
enabled
;
/* Set to TEST_ENABLED or TEST_DISABLED */
long
requirements
;
/* Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */
char
*
name
;
/* "Func2Stress" */
char
*
description
;
/* "This test beats the crap out of func2()" */
int
enabled
;
/* Set to TEST_ENABLED or TEST_DISABLED */
long
requirements
;
/* Set to TEST_REQUIRES_OPENGL, TEST_REQUIRES_AUDIO, ... */
}
TestCaseReference
;
void
TestInit
();
...
...
test/test-automation/tests/test.c
View file @
86738f81
...
...
@@ -27,13 +27,6 @@
#include "SDL_test.h"
/*
TestCaseReference references[] = {
{.name = "hello", .description = "desc", .enabled = 1, .requirements = 0 }
};
*/
TestCaseReference
*
references
[]
=
{
{
"hello"
,
"description"
,
1
,
0
},
{
"hello2"
,
"description"
,
1
,
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