Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Reorganizing the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkauppila committed Aug 6, 2011
1 parent 6ccaec1 commit badc7e0
Show file tree
Hide file tree
Showing 47 changed files with 61 additions and 579 deletions.
32 changes: 10 additions & 22 deletions test/test-automation/Makefile.am
@@ -1,31 +1,19 @@
ACLOCAL_AMFLAGS = -I acinclude -I build-scripts

SUBDIRS = testdummy testrect testplatform testaudio testsurface testrwops testrender
runnerdir = .

bin_PROGRAMS = runner
runner_SOURCES = runner.c support.c
##nobase_runner_HEADERS = fuzzer.h logger.h plain_logger.h xml_logger.h xml.h
runner_CLAGS = -W -Wall -Wextra -g `sdl-config --cflags` -DSDL_NO_COMPAT
runner_LDADD = libtest.la
runner_LDFLAGS = `sdl-config --libs`
## -I .libs/libtest.so

lib_LTLIBRARIES = libtest.la
libtest_la_SOURCES = SDL_test.c logger_helpers.c plain_logger.c xml_logger.c xml.c \
common/common.c common/img_blit.c common/img_blitblend.c common/img_face.c common/img_primitives.c common/img_primitivesblend.c \
fuzzer/utl_crc32.c fuzzer/utl_md5.c fuzzer/utl_random.c fuzzer/fuzzer.c
libtest_la_CLAGS = -fPIC -g
libtest_la_LDFLAGS = `sdl-config --libs`

libtest: libtest.la
echo "Test library compiled."
SUBDIRS = src/libtest src/runner \
tests/testdummy \
tests/testrect \
tests/testplatform \
tests/testaudio \
tests/testsurface \
tests/testrwops \
tests/testrender

all-local: install-tests
install: install-tests
install-tests:
$(SHELL) build-scripts/install-tests.sh

clean:
clean-local:
-rm -Rf tests/ docs/

echo "clean-local is obsolete"
4 changes: 2 additions & 2 deletions test/test-automation/build-scripts/install-tests.sh
Expand Up @@ -5,7 +5,7 @@ EXT="error"

#echo "Installing test suites to $DIRECTORY"

rm -Rfv $DIRECTORY > /dev/null 2>&1
#rm -Rfv $DIRECTORY/ > /dev/null 2>&1
mkdir $DIRECTORY > /dev/null 2>&1

PLATFORM="$(uname)"
Expand All @@ -18,7 +18,7 @@ fi
# TODO: put the test in an array
for suite in "testdummy" "testplatform" "testrect" "testaudio" "testsurface" "testrwops" "testrender"
do
cp -f "$suite/.libs/lib$suite.$EXT" $DIRECTORY
cp -f "$DIRECTORY/$suite/.libs/lib$suite.$EXT" $DIRECTORY
done

#sudo cp .libs/libtest.0.dylib /usr/local/lib/libtest.0.dylib
Expand Down
18 changes: 10 additions & 8 deletions test/test-automation/configure.ac
Expand Up @@ -3,7 +3,7 @@

AC_PREREQ([2.65])
AC_INIT([runner], [0.01], [markus.kauppila@gmail.com])
AC_CONFIG_SRCDIR([runner.c])
AC_CONFIG_SRCDIR([src/runner/runner.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR(acinclude)
AC_CONFIG_AUX_DIR(build-scripts)
Expand Down Expand Up @@ -33,13 +33,15 @@ CFLAGS="-g"
AC_FUNC_FORK

AC_CONFIG_FILES([Makefile
testdummy/Makefile
testrect/Makefile
testplatform/Makefile
testaudio/Makefile
testsurface/Makefile
testrwops/Makefile
testrender/Makefile])
src/runner/Makefile
src/libtest/Makefile
tests/testdummy/Makefile
tests/testrect/Makefile
tests/testplatform/Makefile
tests/testaudio/Makefile
tests/testsurface/Makefile
tests/testrwops/Makefile
tests/testrender/Makefile])

AC_OUTPUT

Expand Down
Expand Up @@ -21,12 +21,11 @@
#ifndef _SDL_TEST_H
#define _SDL_TEST_H

#include "logger.h"
#include "../src/runner/logger.h"

#include "common/common.h"
#include "common/images.h"

#include "fuzzer/fuzzer.h"
#include "../src/libtest/common/common.h"
#include "../src/libtest/common/images.h"
#include "../src/libtest/fuzzer/fuzzer.h"

#define TEST_ENABLED 1
#define TEST_DISABLED 0
Expand Down
Expand Up @@ -24,10 +24,12 @@

#include <SDL/SDL_stdinc.h>

#include "logger.h"
#include "fuzzer/fuzzer.h"

#include "SDL_test.h"
#include "../runner/logger.h"

#include "../../include/SDL_test.h"


/*! \brief return value of test case. Non-zero value means that the test failed */
int _testReturnValue;
Expand Down
Expand Up @@ -2,7 +2,7 @@
#include <stdio.h>
#include <stdlib.h>

#include "../SDL_test.h"
#include "../../../include/SDL_test.h"

#include "fuzzer.h"

Expand Down
Expand Up @@ -4,10 +4,12 @@

#include "stdio.h"

#include "Logger.h"
#include "../../include/SDL_test.h"

#include "../runner/logger.h"

#include "logger_helpers.h"
#include "plain_logger.h"
#include "SDL_test.h"

/*! Current indentationt level */
static int indentLevel;
Expand Down
@@ -1,8 +1,8 @@
#ifndef _PLAIN_LOGGER_H
#define _PLAIN_LOGGER_H

#include "logger.h"
#include <SDL/SDL_stdinc.h>
#include "../runner/logger.h"


/*!
Expand Down
File renamed without changes.
Expand Up @@ -21,8 +21,6 @@
#ifndef _XML_H
#define _XML_H

#include "logger.h"

/*! Defines attribute for XML elements */
typedef struct Attribute {
const char *attribute;
Expand Down
Expand Up @@ -24,11 +24,12 @@

#include <SDL/SDL.h>

#include "Logger.h"
#include "../../include/SDL_test.h"

#include "../runner/logger.h"

#include "xml.h"
#include "logger_helpers.h"
#include "SDL_test.h"

#include "xml_logger.h"

/*! Static strings for XML elements */
Expand Down
Expand Up @@ -3,7 +3,7 @@

#include <SDL/SDL_stdinc.h>

#include "logger.h"
#include "../runner/logger.h"

/*!
* Prints out information about starting the test run in XML
Expand Down
File renamed without changes.
Expand Up @@ -29,14 +29,14 @@
#include <sys/types.h>
#include <sys/stat.h>

#include "fuzzer/fuzzer.h"
#include "../../include/SDL_test.h"
#include "../../config.h"

#include "config.h"
#include "../libtest/fuzzer/fuzzer.h"

#include "SDL_test.h"
#include "../libtest/plain_logger.h"
#include "../libtest/xml_logger.h"

#include "plain_logger.h"
#include "xml_logger.h"
#include "logger.h"
#include "support.h"

Expand Down Expand Up @@ -228,7 +228,7 @@ ScanForTestSuites(char *directoryName, char *extension)
directory = opendir(directoryName);
if(!directory) {
fprintf(stderr, "Failed to open test suite directory: %s\n", directoryName);
perror("Error message: ");
perror("Error message");
exit(2);
}

Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit badc7e0

Please sign in to comment.