1 include $(top_srcdir)/build/autotools/Makefile.am.silent
5 noinst_PROGRAMS = test-conformance
9 test-conform-common.h \
10 test-conform-common.c \
14 # the unit-specific sources; please: keep all sections in alphabetical order!
24 test-timeline-interpolate.c \
25 test-timeline-rewind.c \
30 test-cogl-backface-culling.c \
31 test-cogl-blend-strings.c \
32 test-cogl-depth-test.c \
34 test-cogl-materials.c \
35 test-cogl-viewport.c \
36 test-cogl-multitexture.c \
37 test-cogl-npot-texture.c \
39 test-cogl-offscreen.c \
41 test-cogl-pixel-buffer.c \
43 test-cogl-readpixels.c \
44 test-cogl-sub-texture.c \
45 test-cogl-texture-3d.c \
46 test-cogl-texture-get-set-data.c \
47 test-cogl-texture-mipmaps.c \
48 test-cogl-texture-pixmap-x11.c \
49 test-cogl-texture-rectangle.c \
50 test-cogl-vertex-buffer-contiguous.c \
51 test-cogl-vertex-buffer-interleved.c \
52 test-cogl-vertex-buffer-mutability.c \
53 test-cogl-wrap-modes.c \
58 test-actor-destroy.c \
60 test-actor-invariants.c \
63 test-clutter-cairo-texture.c \
64 test-clutter-rectangle.c \
66 test-clutter-texture.c \
69 test-paint-opacity.c \
77 test-clutter-units.c \
80 test-script-parser.c \
83 test_conformance_SOURCES = $(common_sources) $(units_sources)
85 # For convenience, this provides a way to easily run individual unit tests:
86 .PHONY: wrappers clean-wrappers
88 #UNIT_TESTS = `./test-conformance -l -m thorough | $(GREP) '^/'`
90 wrappers: stamp-test-conformance
92 stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
95 -e 's/^ \{1,\}TEST_CONFORM_SIMPLE *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
96 -e 's/^ \{1,\}TEST_CONFORM_SKIP *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
97 -e 's/^ \{1,\}TEST_CONFORM_TODO *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
98 $(srcdir)/test-conform-main.c > unit-tests
99 @chmod +x test-launcher.sh
100 @( echo "/stamp-test-conformance" ; \
101 echo "/test-conformance" ; \
105 echo ".gitignore" ; \
106 echo "unit-tests" ; \
107 echo "/wrappers/" ) > .gitignore
108 @for i in `cat unit-tests`; \
110 unit=`basename $$i | sed -e s/_/-/g`; \
111 echo " GEN $$unit"; \
112 ( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(EXEEXT) ; \
113 ( echo "#!/bin/sh" ; echo "exec $(abs_builddir)/test-conformance$(EXEEXT) -p $$i \"\$$@\"" ) > wrappers/$$unit$(EXEEXT) ; \
114 chmod +x $$unit$(EXEEXT); \
115 chmod +x wrappers/$$unit$(EXEEXT); \
116 echo "/$$unit$(EXEEXT)" >> .gitignore; \
118 && echo timestamp > $(@F)
121 @for i in `cat unit-tests`; \
123 unit=`basename $$i | sed -e s/_/-/g`; \
125 rm -f $$unit$(EXEEXT) ; \
126 rm -f wrappers/$$unit$(EXEEXT) ; \
128 && rm -f unit-tests \
129 && rm -f stamp-test-conformance
131 # NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
132 # a phony rule that will generate symlink scripts for running individual tests
133 BUILT_SOURCES = wrappers
137 -I$(top_srcdir)/clutter \
138 -I$(top_srcdir)/clutter/cogl \
139 -I$(top_builddir)/clutter \
140 -I$(top_builddir)/clutter/cogl
142 test_conformance_CPPFLAGS = \
143 -DG_DISABLE_SINGLE_INCLUDES \
144 -DCOGL_ENABLE_EXPERIMENTAL_API \
145 -DCOGL_DISABLE_DEPRECATED \
146 -DCLUTTER_DISABLE_DEPRECATED \
147 -DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\"
149 test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
151 test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
153 test_conformance_LDFLAGS = -export-dynamic
156 @$(top_srcdir)/tests/conform/run-tests.sh \
157 ./test-conformance$(EXEEXT) -o test-report.xml
159 test-verbose: wrappers
160 @$(top_srcdir)/tests/conform/run-tests.sh \
161 ./test-conformance$(EXEEXT) -o test-report.xml --verbose
164 GTESTER_REPORT = gtester-report
166 # XXX: we could prevent the conformance test suite from running
167 # by simply defining this variable conditionally
168 TEST_PROGS = test-conformance
171 .PHONY: test-report perf-report full-report
172 .PHONY: test-report-npot perf-report-npot full-report-npot
174 # test-report: run tests and generate report
175 # perf-report: run tests with -m perf and generate report
176 # full-report: like test-report: with -m perf and -m slow
177 test-report perf-report full-report: ${TEST_PROGS}
178 @test -z "${TEST_PROGS}" || { \
179 export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
180 if test -d "$(top_srcdir)/.git"; then \
181 export REVISION="`git describe`" ; \
183 export REVISION="$(VERSION) $(CLUTTER_RELEASE_STATUS)" ; \
185 export TIMESTAMP=`date +%Y-%m-%dT%H:%M:%S%z` ; \
187 test-report) test_options="-k";; \
188 perf-report) test_options="-k -m=perf";; \
189 full-report) test_options="-k -m=perf -m=slow";; \
191 $(top_srcdir)/tests/conform/run-tests.sh \
192 ./test-conformance$(EXEEXT) \
195 -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
196 echo '<?xml version="1.0"?>' > $@.xml ; \
197 echo '<report-collection>' >> $@.xml ; \
198 echo '<info>' >> $@.xml ; \
199 echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
200 echo ' <version>$(VERSION)</version>' >> $@.xml ; \
201 echo " <revision>$$REVISION</revision>" >> $@.xml ; \
202 echo " <date>$$TIMESTAMP</date>" >> $@.xml ; \
203 echo '</info>' >> $@.xml ; \
204 for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
205 sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
208 echo '</report-collection>' >> $@.xml ; \
209 ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
210 rm -rf "$$GTESTER_LOGDIR" ; \
213 # same as above, but with a wrapper that forcibly disables non-power of
215 test-report-npot perf-report-npot full-report-npot: ${TEST_PROGS}
216 @test -z "${TEST_PROGS}" || { \
217 $(top_srcdir)/tests/tools/disable-npots.sh ; \
218 export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
219 if test -d "$(top_srcdir)/.git"; then \
220 export REVISION="`git describe`" ; \
222 export REVISION="$(VERSION) $(CLUTTER_RELEASE_STATUS)" ; \
224 export TIMESTAMP=`date +%Y-%m-%dT%H:%M:%S%z` ; \
226 test-report-npot) test_options="-k";; \
227 perf-report-npot) test_options="-k -m=perf";; \
228 full-report-npot) test_options="-k -m=perf -m=slow";; \
230 $(top_srcdir)/tests/conform/run-tests.sh \
231 ./test-conformance$(EXEEXT) \
234 -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
235 echo '<?xml version="1.0"?>' > $@.xml ; \
236 echo '<report-collection>' >> $@.xml ; \
237 echo '<info>' >> $@.xml ; \
238 echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
239 echo ' <version>$(VERSION)</version>' >> $@.xml ; \
240 echo " <revision>$$REVISION</revision>" >> $@.xml ; \
241 echo " <date>$$TIMESTAMP</date>" >> $@.xml ; \
242 echo '</info>' >> $@.xml ; \
243 for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
244 sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
247 echo '</report-collection>' >> $@.xml ; \
248 ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
249 rm -rf "$$GTESTER_LOGDIR" ; \
256 test-report-npot.xml \
257 perf-report-npot.xml \
264 test-report-npot.html \
265 perf-report-npot.html \
266 full-report-npot.html
268 EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh.in run-tests.sh
269 DISTCLEANFILES = test-launcher.sh .gitignore
271 # we override the clean-generic target to clean up the wrappers so
272 # we cannot use CLEANFILES
273 clean-generic: clean-wrappers
274 $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)