Commit 2f3c2a94 authored by Markus Kauppila's avatar Markus Kauppila

Reorganizing the project.

--HG--
rename : test/test-automation/SDL_test.h => test/test-automation/include/SDL_test.h
rename : test/test-automation/SDL_test.c => test/test-automation/src/libtest/SDL_test.c
rename : test/test-automation/common/common.c => test/test-automation/src/libtest/common/common.c
rename : test/test-automation/common/common.h => test/test-automation/src/libtest/common/common.h
rename : test/test-automation/common/images.h => test/test-automation/src/libtest/common/images.h
rename : test/test-automation/common/img_blit.c => test/test-automation/src/libtest/common/img_blit.c
rename : test/test-automation/common/img_blitblend.c => test/test-automation/src/libtest/common/img_blitblend.c
rename : test/test-automation/common/img_face.c => test/test-automation/src/libtest/common/img_face.c
rename : test/test-automation/common/img_primitives.c => test/test-automation/src/libtest/common/img_primitives.c
rename : test/test-automation/common/img_primitivesblend.c => test/test-automation/src/libtest/common/img_primitivesblend.c
rename : test/test-automation/fuzzer/fuzzer.c => test/test-automation/src/libtest/fuzzer/fuzzer.c
rename : test/test-automation/fuzzer/fuzzer.h => test/test-automation/src/libtest/fuzzer/fuzzer.h
rename : test/test-automation/fuzzer/utl_crc32.c => test/test-automation/src/libtest/fuzzer/utl_crc32.c
rename : test/test-automation/fuzzer/utl_crc32.h => test/test-automation/src/libtest/fuzzer/utl_crc32.h
rename : test/test-automation/fuzzer/utl_md5.c => test/test-automation/src/libtest/fuzzer/utl_md5.c
rename : test/test-automation/fuzzer/utl_md5.h => test/test-automation/src/libtest/fuzzer/utl_md5.h
rename : test/test-automation/fuzzer/utl_random.c => test/test-automation/src/libtest/fuzzer/utl_random.c
rename : test/test-automation/fuzzer/utl_random.h => test/test-automation/src/libtest/fuzzer/utl_random.h
rename : test/test-automation/logger_helpers.c => test/test-automation/src/libtest/logger_helpers.c
rename : test/test-automation/logger_helpers.h => test/test-automation/src/libtest/logger_helpers.h
rename : test/test-automation/plain_logger.c => test/test-automation/src/libtest/plain_logger.c
rename : test/test-automation/plain_logger.h => test/test-automation/src/libtest/plain_logger.h
rename : test/test-automation/xml.c => test/test-automation/src/libtest/xml.c
rename : test/test-automation/xml.h => test/test-automation/src/libtest/xml.h
rename : test/test-automation/xml_logger.c => test/test-automation/src/libtest/xml_logger.c
rename : test/test-automation/xml_logger.h => test/test-automation/src/libtest/xml_logger.h
rename : test/test-automation/logger.h => test/test-automation/src/runner/logger.h
rename : test/test-automation/runner.c => test/test-automation/src/runner/runner.c
rename : test/test-automation/support.c => test/test-automation/src/runner/support.c
rename : test/test-automation/support.h => test/test-automation/src/runner/support.h
rename : test/test-automation/testaudio/Makefile.am => test/test-automation/tests/testaudio/Makefile.am
rename : test/test-automation/testaudio/testaudio.c => test/test-automation/tests/testaudio/testaudio.c
rename : test/test-automation/testdummy/Makefile.am => test/test-automation/tests/testdummy/Makefile.am
rename : test/test-automation/testdummy/testdummy.c => test/test-automation/tests/testdummy/testdummy.c
rename : test/test-automation/testplatform/Makefile.am => test/test-automation/tests/testplatform/Makefile.am
rename : test/test-automation/testrect/Makefile.am => test/test-automation/tests/testrect/Makefile.am
rename : test/test-automation/testrect/testrect.c => test/test-automation/tests/testrect/testrect.c
rename : test/test-automation/testrender/Makefile.am => test/test-automation/tests/testrender/Makefile.am
rename : test/test-automation/testrender/testrender.c => test/test-automation/tests/testrender/testrender.c
rename : test/test-automation/testrwops/Makefile.am => test/test-automation/tests/testrwops/Makefile.am
rename : test/test-automation/testrwops/testrwops.c => test/test-automation/tests/testrwops/testrwops.c
rename : test/test-automation/testsurface/Makefile.am => test/test-automation/tests/testsurface/Makefile.am
rename : test/test-automation/testsurface/testsurface.c => test/test-automation/tests/testsurface/testsurface.c
parent 26ac384e
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"
......@@ -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)"
......@@ -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
......
......@@ -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)
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -2,7 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
#include "../SDL_test.h"
#include "../../../include/SDL_test.h"
#include "fuzzer.h"
......
......@@ -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;
......
#ifndef _PLAIN_LOGGER_H
#define _PLAIN_LOGGER_H
#include "logger.h"
#include <SDL/SDL_stdinc.h>
#include "../runner/logger.h"
/*!
......
......@@ -21,8 +21,6 @@
#ifndef _XML_H
#define _XML_H
#include "logger.h"
/*! Defines attribute for XML elements */
typedef struct Attribute {
const char *attribute;
......
......@@ -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 */
......
......@@ -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
......
......@@ -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"
......@@ -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);
}
......
This diff is collapsed.
lib_LTLIBRARIES = libtestaudio.la
libtestaudio_la_SOURCES = testaudio.c
libtestaudio_la_CLAGS = -fPIC -g
libtestaudio_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
libtestaudio_la_LDFLAGS = `sdl-config --libs` -I ../../src/libtest/.libs/libtest.la
......@@ -6,7 +6,7 @@
#include <SDL/SDL.h>
#include "../SDL_test.h"
#include "../../include/SDL_test.h"
/* Test cases */
static const TestCaseReference test1 =
......
lib_LTLIBRARIES = libtestdummy.la
libtestdummy_la_SOURCES = testdummy.c
libtestdummy_la_CLAGS = -fPIC -g
libtestdummy_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
libtestdummy_la_LDFLAGS = `sdl-config --libs` -I ../../src/libtest/.libs/libtest.la
......@@ -29,8 +29,7 @@
#include <SDL/SDL.h>
#include "../SDL_test.h"
//#include "fuzzer/fuzzer.h"
#include "../../include/SDL_test.h"
/* Test case references */
static const TestCaseReference test1 =
......
lib_LTLIBRARIES = libtestplatform.la
libtestplatform_la_SOURCES = testplatform.c
libtestplatform_la_CLAGS = -fPIC -g
libtestplatform_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
libtestplatform_la_LDFLAGS = `sdl-config --libs` -I ../../src/libtest/.libs/libtest.la
lib_LTLIBRARIES = libtestrect.la
libtestrect_la_SOURCES = testrect.c
libtestrect_la_CLAGS = -fPIC -g
libtestrect_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
libtestrect_la_LDFLAGS = `sdl-config --libs` -I ../../src/libtest/.libs/libtest.la
......@@ -6,7 +6,7 @@
#include <SDL/SDL.h>
#include "../SDL_test.h"
#include "../../include/SDL_test.h"
/* Test cases */
static const TestCaseReference test1 =
......
lib_LTLIBRARIES = libtestrender.la
libtestrender_la_SOURCES = testrender.c
libtestrender_la_CLAGS = -fPIC -g
libtestrender_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
libtestrender_la_LDFLAGS = `sdl-config --libs` -I ../../src/libtest/.libs/libtest.la
......@@ -7,7 +7,7 @@
#include <SDL/SDL.h>
#include "../SDL_test.h"
#include "../../include/SDL_test.h"
......
lib_LTLIBRARIES = libtestrwops.la
libtestrwops_la_SOURCES = testrwops.c
libtestrwops_la_CLAGS = -fPIC -g
libtestrwops_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
libtestrwops_la_LDFLAGS = `sdl-config --libs` -I ../../src/libtest/.libs/libtest.la
......@@ -7,7 +7,7 @@
#include <SDL/SDL.h>
#include "../SDL_test.h"
#include "../../include/SDL_test.h"
......
lib_LTLIBRARIES = libtestsurface.la
libtestsurface_la_SOURCES = testsurface.c
libtestsurface_la_CLAGS = -fPIC -g
libtestsurface_la_LDFLAGS = `sdl-config --libs` -I ../.libs/libtest.la
libtestsurface_la_LDFLAGS = `sdl-config --libs` -I ../../src/libtest/.libs/libtest.la
......@@ -3,12 +3,11 @@
*/
#include <stdio.h>
#include <sys/stat.h>
#include <SDL/SDL.h>
#include "../SDL_test.h"
#include <sys/stat.h>
#include "../../include/SDL_test.h"
/* Test case references */
static const TestCaseReference test1 =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment