Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merged Edgar's code changes from Google Summer of Code 2009
  • Loading branch information
slouken committed Sep 7, 2009
1 parent 8bdf637 commit ab389690b35b67f1f1a5dd1c25bdda3bda77fb85
@@ -196,7 +196,10 @@ SDL_StopEventThread(void)
SDL_DestroyMutex(SDL_EventLock.lock);
}
#ifndef IPOD
SDL_DestroyMutex(SDL_EventQ.lock);
if (SDL_EventQ.lock) {
SDL_DestroyMutex(SDL_EventQ.lock);
SDL_EventQ.lock = NULL;
}
#endif
}

@@ -0,0 +1,54 @@


CFLAGS := -W -Wall -Wextra -g -I. `sdl-config --cflags`
LDFLAGS := `sdl-config --libs`

# If it doesn't pick up defaults
#CFLAGS := -I. -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL
#LDFLAGS := -lm -ldl -lesd -lpthread

SRC := testsdl.c \
rwops/rwops.c \
platform/platform.c \
surface/surface.c \
render/render.c \
audio/audio.c
COMMON_SRC := SDL_at.c common/common.c
COMMON_INCLUDE := SDL_at.h

TESTS_ALL := testsdl \
rwops/rwops \
platform/platform \
surface/surface \
render/render \
audio/audio


.PHONY: all clean test


all: $(TESTS_ALL)

test: all
@./testsdl

testsdl: $(SRC) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(COMMON_SRC)

rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC) -DTEST_STANDALONE

platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE

surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE

render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ render/render.c $(COMMON_SRC) -DTEST_STANDALONE

audio/audio: audio/audio.c $(COMMON_INCLUDE) $(COMMON_SRC)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ audio/audio.c $(COMMON_SRC) -DTEST_STANDALONE

clean:
$(RM) $(TESTS_ALL)
@@ -0,0 +1,59 @@


SDL Automated Testing Framework User Documentation
by Edgar Simo Serra



Abstract

The SDL Automated Testing Framework, hereby after called SDL_AT, is a meant
to test the SDL code for regressions and other possible failures. It can also
be used to display what your SDL set up supports.



Basics

The main way to use the framework is to compile it and run it, that can be
done with the following command:

$> make test

It should then display something like:

Platform : All tests successful (2)
SDL_RWops : All tests successful (5)
SDL_Surface : All tests successful (6)
Rendering with x11 driver : All tests successful (4)

Indicating that all tests were successful. If however a test fails output it
will report the failure to stderr indicating where and why it happened. This
output can then be sent to the developers so they can attempt to fix the
problem.



Advanced

By passing the "-h" or "--help" parameter to testsdl you can get an overview
of all the possible options you can set to furthur tweak the testing. A sample
of the options would be the following:

Usage: ./testsdl [OPTIONS]
Options are:
-m, --manual enables tests that require user interaction
--noplatform do not run the platform tests
--norwops do not run the rwops tests
--nosurface do not run the surface tests
--norender do not run the render tests
-v, --verbose increases verbosity level by 1 for each -v
-q, --quiet only displays errors
-h, --help display this message and exit



Developers

See SDL_at.h for developer information.

0 comments on commit ab38969

Please sign in to comment.