|
Packit Service |
2781ba |
SUBDIRS = \
|
|
Packit Service |
2781ba |
reference \
|
|
Packit Service |
2781ba |
tests
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
# The test program returns 'success' if all buffer tests passed
|
|
Packit Service |
2781ba |
TESTS = buffer-tests-results.sh
|
|
Packit Service |
2781ba |
buffer-tests-results.sh: buffer-tests-report
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
TESTS_ENVIRONMENT = REFERENCE_DIR=$(top_srcdir)/tests/buffer/reference
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
EXTRA_DIST = buffer-tests-results.sh
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
# Always build buffer-test to catch compilation problems early
|
|
Packit Service |
2781ba |
BUILT_SOURCES = buffer-tests.inc
|
|
Packit Service |
2781ba |
check_PROGRAMS = buffer-test
|
|
Packit Service |
2781ba |
AM_CPPFLAGS = \
|
|
Packit Service |
2781ba |
-I$(top_srcdir) \
|
|
Packit Service |
2781ba |
-I$(top_builddir)/gegl \
|
|
Packit Service |
2781ba |
-I$(top_srcdir)/gegl \
|
|
Packit Service |
2781ba |
-I$(top_builddir)/gegl/buffer \
|
|
Packit Service |
2781ba |
-I$(top_srcdir)/gegl/buffer \
|
|
Packit Service |
2781ba |
-I$(top_builddir)/gegl/property-types \
|
|
Packit Service |
2781ba |
-I$(top_srcdir)/gegl/property-types \
|
|
Packit Service |
2781ba |
-I$(top_builddir)/gegl/operation \
|
|
Packit Service |
2781ba |
-I$(top_srcdir)/gegl/operation \
|
|
Packit Service |
2781ba |
-I$(top_builddir)/gegl/opencl \
|
|
Packit Service |
2781ba |
-I$(top_srcdir)/gegl/opencl
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
AM_CFLAGS = $(DEP_CFLAGS) $(BABL_CFLAGS)
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
buffer_test_LDADD = \
|
|
Packit Service |
2781ba |
$(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \
|
|
Packit Service |
2781ba |
$(DEP_LIBS) $(BABL_LIBS)
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
# Our custom target rules
|
|
Packit Service |
2781ba |
buffer-tests.inc: $(buffer_test_SOURCES) Makefile.am $(top_srcdir)/tests/buffer/tests/*.c
|
|
Packit Service |
2781ba |
@echo 'Generating $@'
|
|
Packit Service |
2781ba |
@echo '/* this file is generated by the build system */' > $@
|
|
Packit Service |
2781ba |
@for TEST in `ls $(top_srcdir)/tests/buffer/tests/*.c | sed -e s:$(top_srcdir)/tests/buffer/tests/:: -e s:\\\.c::`; do \
|
|
Packit Service |
2781ba |
echo "#define TESTNAME $$TEST" >> $@;\
|
|
Packit Service |
2781ba |
echo "#define TEST() static gchar * TESTNAME (void)" >> $@;\
|
|
Packit Service |
2781ba |
echo "#include \"tests/"$$TEST".c\"" >> $@;\
|
|
Packit Service |
2781ba |
echo "#undef TESTNAME" >> $@;\
|
|
Packit Service |
2781ba |
echo "#undef TEST" >> $@;\
|
|
Packit Service |
2781ba |
done;
|
|
Packit Service |
2781ba |
@echo 'typedef gchar *(*TestFunc) ();TestFunc tests[]={' >> $@
|
|
Packit Service |
2781ba |
@for TEST in `ls $(top_srcdir)/tests/buffer/tests/*.c | sed -e s:$(top_srcdir)/tests/buffer/tests/:: -e s:\\\.c::`; do \
|
|
Packit Service |
2781ba |
echo $$TEST, >> $@;\
|
|
Packit Service |
2781ba |
done;
|
|
Packit Service |
2781ba |
@echo '};' >> $@
|
|
Packit Service |
2781ba |
@echo 'static gchar *test_names[]={' >> $@
|
|
Packit Service |
2781ba |
@for TEST in `ls $(top_srcdir)/tests/buffer/tests/*.c | sed -e s:$(top_srcdir)/tests/buffer/tests/:: -e s:\\\.c::`; do \
|
|
Packit Service |
2781ba |
echo \"$$TEST\", >> $@;\
|
|
Packit Service |
2781ba |
done;
|
|
Packit Service |
2781ba |
@echo '};' >> $@
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
builddir_gegl_env = GEGL_SWAP=RAM GEGL_PATH=$(top_builddir)/operations
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
buffer-tests-report: buffer-test$(EXEEXT) $(top_srcdir)/tests/buffer/reference/*.buf
|
|
Packit Service |
2781ba |
@mkdir -p output > /dev/null 2>&1
|
|
Packit Service |
2781ba |
$(builddir_gegl_env) ./buffer-test$(EXEEXT)
|
|
Packit Service |
2781ba |
for f in $(top_srcdir)/tests/buffer/reference/*.buf; do LC_ALL=C diff --report-identical-files --context=50 $$f output/`basename $$f`; done > buffer-tests-report; true
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
clean-local:
|
|
Packit Service |
2781ba |
rm -rf output
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
# Don't forget to clean
|
|
Packit Service |
2781ba |
CLEANFILES = buffer-tests.inc buffer-tests-report
|