2011-05-05 22:34:38 +00:00
|
|
|
include $(top_srcdir)/build/autotools/Makefile.am.silent
|
|
|
|
|
|
|
|
NULL =
|
|
|
|
|
|
|
|
noinst_PROGRAMS = test-conformance
|
|
|
|
|
|
|
|
common_sources = \
|
|
|
|
test-utils.h \
|
|
|
|
test-utils.c \
|
|
|
|
test-conform-main.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
unported_test_sources = \
|
|
|
|
test-fixed.c \
|
|
|
|
test-materials.c \
|
|
|
|
test-viewport.c \
|
|
|
|
test-multitexture.c \
|
|
|
|
test-npot-texture.c \
|
|
|
|
test-object.c \
|
|
|
|
test-premult.c \
|
|
|
|
test-readpixels.c \
|
|
|
|
test-texture-get-set-data.c \
|
|
|
|
test-texture-mipmaps.c \
|
|
|
|
test-texture-pixmap-x11.c \
|
|
|
|
test-texture-rectangle.c \
|
|
|
|
test-atlas-migration.c \
|
|
|
|
test-vertex-buffer-contiguous.c \
|
|
|
|
test-vertex-buffer-interleved.c \
|
|
|
|
test-vertex-buffer-mutability.c \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
test_sources = \
|
2011-10-28 14:00:54 +00:00
|
|
|
test-bitmask.c \
|
2011-10-02 08:22:43 +00:00
|
|
|
test-blend-strings.c \
|
2011-05-05 22:34:38 +00:00
|
|
|
test-depth-test.c \
|
2011-09-15 12:12:27 +00:00
|
|
|
test-color-mask.c \
|
2011-09-19 14:24:36 +00:00
|
|
|
test-backface-culling.c \
|
2011-10-01 07:07:36 +00:00
|
|
|
test-just-vertex-shader.c \
|
2011-10-21 22:41:44 +00:00
|
|
|
test-path.c \
|
2011-10-01 09:04:32 +00:00
|
|
|
test-pipeline-user-matrix.c \
|
2011-11-03 17:28:01 +00:00
|
|
|
test-pipeline-uniforms.c \
|
2012-02-25 21:00:55 +00:00
|
|
|
test-pixel-buffer.c \
|
2011-11-17 16:52:50 +00:00
|
|
|
test-snippets.c \
|
2011-10-12 16:12:08 +00:00
|
|
|
test-wrap-modes.c \
|
2011-10-28 18:10:01 +00:00
|
|
|
test-sub-texture.c \
|
2011-12-02 10:55:41 +00:00
|
|
|
test-custom-attributes.c \
|
2012-01-28 13:19:01 +00:00
|
|
|
test-offscreen.c \
|
2012-02-06 13:30:08 +00:00
|
|
|
test-primitive.c \
|
2012-02-09 17:54:07 +00:00
|
|
|
test-texture-3d.c \
|
2012-02-09 20:36:14 +00:00
|
|
|
test-sparse-pipeline.c \
|
2012-02-29 21:43:01 +00:00
|
|
|
test-read-texture-formats.c \
|
2012-03-01 00:40:34 +00:00
|
|
|
test-write-texture-formats.c \
|
2012-03-06 23:14:27 +00:00
|
|
|
test-point-size.c \
|
2012-03-06 23:36:45 +00:00
|
|
|
test-point-sprite.c \
|
2011-05-05 22:34:38 +00:00
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
test_conformance_SOURCES = $(common_sources) $(test_sources)
|
|
|
|
|
|
|
|
if OS_WIN32
|
|
|
|
SHEXT =
|
|
|
|
else
|
|
|
|
SHEXT = $(EXEEXT)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# For convenience, this provides a way to easily run individual unit tests:
|
|
|
|
.PHONY: wrappers clean-wrappers
|
|
|
|
|
|
|
|
wrappers: stamp-test-conformance
|
|
|
|
@true
|
|
|
|
stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
|
|
|
|
@mkdir -p wrappers
|
2012-02-23 12:30:51 +00:00
|
|
|
@sed -n -e 's/^ \{1,\}ADD_TEST *( *\([a-zA-Z0-9_]\{1,\}\).*/\1/p' $(srcdir)/test-conform-main.c > unit-tests
|
2011-05-05 22:34:38 +00:00
|
|
|
@chmod +x test-launcher.sh
|
|
|
|
@( echo "/stamp-test-conformance" ; \
|
2012-02-23 12:30:51 +00:00
|
|
|
echo "/test-conformance$(EXEEXT)" ; \
|
2011-05-05 22:34:38 +00:00
|
|
|
echo "*.o" ; \
|
|
|
|
echo ".gitignore" ; \
|
2012-02-23 12:30:51 +00:00
|
|
|
echo "unit-tests" ; ) > .gitignore
|
2011-05-05 22:34:38 +00:00
|
|
|
@for i in `cat unit-tests`; \
|
|
|
|
do \
|
|
|
|
unit=`basename $$i | sed -e s/_/-/g`; \
|
|
|
|
echo " GEN $$unit"; \
|
|
|
|
( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(SHEXT) ; \
|
|
|
|
chmod +x $$unit$(SHEXT); \
|
|
|
|
echo "/$$unit$(SHEXT)" >> .gitignore; \
|
|
|
|
done \
|
|
|
|
&& echo timestamp > $(@F)
|
|
|
|
|
|
|
|
clean-wrappers:
|
|
|
|
@for i in `cat unit-tests`; \
|
|
|
|
do \
|
|
|
|
unit=`basename $$i | sed -e s/_/-/g`; \
|
|
|
|
echo " RM $$unit"; \
|
|
|
|
rm -f $$unit$(SHEXT) ; \
|
|
|
|
done \
|
|
|
|
&& rm -f unit-tests \
|
|
|
|
&& rm -f stamp-test-conformance
|
|
|
|
|
|
|
|
# NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
|
|
|
|
# a phony rule that will generate symlink scripts for running individual tests
|
|
|
|
BUILT_SOURCES = wrappers
|
|
|
|
|
2011-10-28 14:00:54 +00:00
|
|
|
# The include of the $(buildir)/cogl directory here is to make it so
|
|
|
|
# that tests that directly include Cogl source code for whitebox
|
|
|
|
# testing (such as test-bitmask) will still compile
|
|
|
|
INCLUDES = \
|
|
|
|
-I$(top_srcdir) \
|
|
|
|
-I$(top_builddir)/cogl
|
2011-05-05 22:34:38 +00:00
|
|
|
|
|
|
|
test_conformance_CPPFLAGS = \
|
|
|
|
-DCOGL_ENABLE_EXPERIMENTAL_API \
|
|
|
|
-DCOGL_DISABLE_DEPRECATED \
|
2011-10-28 14:00:54 +00:00
|
|
|
-DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\" \
|
|
|
|
-DCLUTTER_COMPILATION
|
2011-05-05 22:34:38 +00:00
|
|
|
|
|
|
|
test_conformance_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
|
|
|
|
test_conformance_LDADD = $(COGL_DEP_LIBS) $(top_builddir)/cogl/libcogl.la
|
|
|
|
test_conformance_LDFLAGS = -export-dynamic
|
|
|
|
|
|
|
|
test: wrappers
|
2012-02-23 12:30:51 +00:00
|
|
|
@$(top_srcdir)/tests/conform/run-tests.sh $(abs_builddir)/config.env
|
2011-05-05 22:34:38 +00:00
|
|
|
|
|
|
|
# XXX: we could prevent the conformance test suite from running
|
|
|
|
# by simply defining this variable conditionally
|
|
|
|
TEST_PROGS = test-conformance
|
|
|
|
|
|
|
|
.PHONY: test
|
|
|
|
|
|
|
|
EXTRA_DIST = test-launcher.sh.in run-tests.sh
|
|
|
|
DISTCLEANFILES = test-launcher.sh .gitignore
|
|
|
|
|
2011-05-12 09:06:32 +00:00
|
|
|
dist-hook: ../../build/win32/vs9/test-conformance-cogl.vcproj ../../build/win32/vs10/test-conformance-cogl.vcxproj ../../build/win32/vs10/test-conformance-cogl.vcxproj.filters
|
|
|
|
|
|
|
|
../../build/win32/vs9/test-conformance-cogl.vcproj: $(top_srcdir)/build/win32/vs9/test-conformance-cogl.vcprojin
|
|
|
|
for F in $(test_conformance_SOURCES); do \
|
|
|
|
case $$F in \
|
|
|
|
*.c) echo ' <File RelativePath="..\..\..\tests\conform\'$$F'" />' \
|
|
|
|
;; \
|
|
|
|
esac; \
|
|
|
|
done >testconformance.sourcefiles
|
|
|
|
$(CPP) -P - <$(top_srcdir)/build/win32/vs9/test-conformance-cogl.vcprojin >$@
|
|
|
|
rm testconformance.sourcefiles
|
|
|
|
|
|
|
|
../../build/win32/vs10/test-conformance-cogl.vcxproj: $(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxprojin
|
|
|
|
for F in $(test_conformance_SOURCES); do \
|
|
|
|
case $$F in \
|
|
|
|
*.c) echo ' <ClCompile Include="..\..\..\tests\conform\'$$F'" />' \
|
|
|
|
;; \
|
|
|
|
esac; \
|
|
|
|
done >testconformance.vs10.sourcefiles
|
|
|
|
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxprojin >$@
|
|
|
|
rm testconformance.vs10.sourcefiles
|
|
|
|
|
|
|
|
../../build/win32/vs10/test-conformance-cogl.vcxproj.filters: $(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxproj.filtersin
|
|
|
|
for F in $(test_conformance_SOURCES); do \
|
|
|
|
case $$F in \
|
|
|
|
*.c) echo ' <ClCompile Include="..\..\..\tests\conform\'$$F'"><Filter>Sources</Filter></ClCompile>' \
|
|
|
|
;; \
|
|
|
|
esac; \
|
|
|
|
done >testconformance.vs10.sourcefiles.filters
|
|
|
|
$(CPP) -P - <$(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxproj.filtersin >$@
|
|
|
|
rm testconformance.vs10.sourcefiles.filters
|
|
|
|
|
|
|
|
# Let the VS9/VS10 Project files be cleared out before they are re-expanded...
|
|
|
|
DISTCLEANFILES += ../../build/win32/vs9/test-conformance-cogl.vcproj \
|
|
|
|
../../build/win32/vs10/test-conformance-cogl.vcxproj \
|
|
|
|
../../build/win32/vs10/test-conformance-cogl.vcxproj.filters
|
|
|
|
|
2011-05-05 22:34:38 +00:00
|
|
|
# we override the clean-generic target to clean up the wrappers so
|
|
|
|
# we cannot use CLEANFILES
|
|
|
|
clean-generic: clean-wrappers
|
2012-03-05 23:24:16 +00:00
|
|
|
$(QUIET_RM)rm -f .log
|