1 include $(top_srcdir)/build/autotools/Makefile.am.silent
5 noinst_PROGRAMS = test-conformance
13 unported_test_sources = \
22 test-texture-get-set-data.c \
23 test-texture-mipmaps.c \
24 test-texture-pixmap-x11.c \
25 test-texture-rectangle.c \
26 test-atlas-migration.c \
27 test-vertex-buffer-contiguous.c \
28 test-vertex-buffer-interleved.c \
29 test-vertex-buffer-mutability.c \
34 test-blend-strings.c \
37 test-backface-culling.c \
38 test-just-vertex-shader.c \
40 test-pipeline-user-matrix.c \
41 test-pipeline-uniforms.c \
46 test-custom-attributes.c \
50 test-sparse-pipeline.c \
51 test-read-texture-formats.c \
52 test-write-texture-formats.c \
57 test_conformance_SOURCES = $(common_sources) $(test_sources)
65 # For convenience, this provides a way to easily run individual unit tests:
66 .PHONY: wrappers clean-wrappers
68 wrappers: stamp-test-conformance
70 stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
72 @sed -n -e 's/^ \{1,\}ADD_TEST *( *\([a-zA-Z0-9_]\{1,\}\).*/\1/p' $(srcdir)/test-conform-main.c > unit-tests
73 @chmod +x test-launcher.sh
74 @( echo "/stamp-test-conformance" ; \
75 echo "/test-conformance$(EXEEXT)" ; \
78 echo "unit-tests" ; ) > .gitignore
79 @for i in `cat unit-tests`; \
81 unit=`basename $$i | sed -e s/_/-/g`; \
83 ( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(SHEXT) ; \
84 chmod +x $$unit$(SHEXT); \
85 echo "/$$unit$(SHEXT)" >> .gitignore; \
87 && echo timestamp > $(@F)
90 @for i in `cat unit-tests`; \
92 unit=`basename $$i | sed -e s/_/-/g`; \
94 rm -f $$unit$(SHEXT) ; \
97 && rm -f stamp-test-conformance
99 # NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
100 # a phony rule that will generate symlink scripts for running individual tests
101 BUILT_SOURCES = wrappers
103 # The include of the $(buildir)/cogl directory here is to make it so
104 # that tests that directly include Cogl source code for whitebox
105 # testing (such as test-bitmask) will still compile
108 -I$(top_builddir)/cogl
110 test_conformance_CPPFLAGS = \
111 -DCOGL_ENABLE_EXPERIMENTAL_API \
112 -DCOGL_DISABLE_DEPRECATED \
113 -DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\" \
114 -DCLUTTER_COMPILATION
116 test_conformance_CFLAGS = -g3 -O0 $(COGL_DEP_CFLAGS) $(COGL_EXTRA_CFLAGS)
117 test_conformance_LDADD = $(COGL_DEP_LIBS) $(top_builddir)/cogl/libcogl.la
118 test_conformance_LDFLAGS = -export-dynamic
121 @$(top_srcdir)/tests/conform/run-tests.sh $(abs_builddir)/config.env
123 # XXX: we could prevent the conformance test suite from running
124 # by simply defining this variable conditionally
125 TEST_PROGS = test-conformance
129 EXTRA_DIST = test-launcher.sh.in run-tests.sh
130 DISTCLEANFILES = test-launcher.sh .gitignore
132 dist-hook: ../../build/win32/vs9/test-conformance-cogl.vcproj ../../build/win32/vs10/test-conformance-cogl.vcxproj ../../build/win32/vs10/test-conformance-cogl.vcxproj.filters
134 ../../build/win32/vs9/test-conformance-cogl.vcproj: $(top_srcdir)/build/win32/vs9/test-conformance-cogl.vcprojin
135 for F in $(test_conformance_SOURCES); do \
137 *.c) echo ' <File RelativePath="..\..\..\tests\conform\'$$F'" />' \
140 done >testconformance.sourcefiles
141 $(CPP) -P - <$(top_srcdir)/build/win32/vs9/test-conformance-cogl.vcprojin >$@
142 rm testconformance.sourcefiles
144 ../../build/win32/vs10/test-conformance-cogl.vcxproj: $(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxprojin
145 for F in $(test_conformance_SOURCES); do \
147 *.c) echo ' <ClCompile Include="..\..\..\tests\conform\'$$F'" />' \
150 done >testconformance.vs10.sourcefiles
151 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxprojin >$@
152 rm testconformance.vs10.sourcefiles
154 ../../build/win32/vs10/test-conformance-cogl.vcxproj.filters: $(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxproj.filtersin
155 for F in $(test_conformance_SOURCES); do \
157 *.c) echo ' <ClCompile Include="..\..\..\tests\conform\'$$F'"><Filter>Sources</Filter></ClCompile>' \
160 done >testconformance.vs10.sourcefiles.filters
161 $(CPP) -P - <$(top_srcdir)/build/win32/vs10/test-conformance-cogl.vcxproj.filtersin >$@
162 rm testconformance.vs10.sourcefiles.filters
164 # Let the VS9/VS10 Project files be cleared out before they are re-expanded...
165 DISTCLEANFILES += ../../build/win32/vs9/test-conformance-cogl.vcproj \
166 ../../build/win32/vs10/test-conformance-cogl.vcxproj \
167 ../../build/win32/vs10/test-conformance-cogl.vcxproj.filters
169 # we override the clean-generic target to clean up the wrappers so
170 # we cannot use CLEANFILES
171 clean-generic: clean-wrappers
172 $(QUIET_RM)rm -f .log