1 include $(top_srcdir)/build/autotools/Makefile.am.silent
5 noinst_PROGRAMS = test-conformance
7 test_conformance_SOURCES = \
9 test-conform-common.c \
10 test-conform-common.h \
12 test-timeline-interpolate.c \
13 test-timeline-rewind.c \
15 test-cogl-vertex-buffer-contiguous.c \
16 test-cogl-vertex-buffer-interleved.c \
17 test-cogl-vertex-buffer-mutability.c \
19 test-cogl-backface-culling.c \
20 test-cogl-npot-texture.c \
21 test-cogl-blend-strings.c \
23 test-cogl-materials.c \
24 test-cogl-viewport.c \
25 test-cogl-offscreen.c \
26 test-cogl-readpixels.c \
27 test-cogl-multitexture.c \
28 test-cogl-texture-mipmaps.c \
29 test-cogl-texture-rectangle.c \
30 test-cogl-texture-3d.c \
31 test-cogl-texture-pixmap-x11.c \
32 test-cogl-texture-get-set-data.c \
33 test-cogl-wrap-modes.c \
34 test-cogl-pixel-buffer.c \
37 test-cogl-depth-test.c \
40 test-clutter-rectangle.c \
41 test-actor-invariants.c \
42 test-paint-opacity.c \
45 test-clutter-cairo-texture.c \
50 test-clutter-units.c \
54 test-cogl-sub-texture.c \
55 test-script-parser.c \
56 test-actor-destroy.c \
60 test-clutter-texture.c \
64 # For convenience, this provides a way to easily run individual unit tests:
65 .PHONY: wrappers clean-wrappers
67 UNIT_TESTS = `./test-conformance -l -m thorough | $(GREP) '^/'`
69 wrappers: stamp-test-conformance
71 stamp-test-conformance: test-conformance$(EXEEXT)
73 @chmod +x test-launcher.sh
74 @for i in $(UNIT_TESTS); \
76 unit=`basename $$i | sed -e s/_/-/g`; \
78 ( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(EXEEXT) ; \
79 ( echo "#!/bin/sh" ; echo "exec ./test-conformance$(EXEEXT) -p $$i \"\$$@\"" ) > wrappers/$$unit$(EXEEXT) ; \
80 chmod +x $$unit$(EXEEXT); \
81 chmod +x wrappers/$$unit$(EXEEXT); \
83 && echo timestamp > $(@F)
86 @for i in $(UNIT_TESTS); \
88 unit=`basename $$i | sed -e s/_/-/g`; \
90 rm -f $$unit$(EXEEXT) ; \
91 rm -f wrappers/$$unit$(EXEEXT) ; \
93 && rm -f stamp-test-conformance
95 # NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
96 # a phony rule that will generate symlink scripts for running individual tests
97 BUILT_SOURCES = wrappers
101 -I$(top_srcdir)/clutter \
102 -I$(top_srcdir)/clutter/cogl \
103 -I$(top_builddir)/clutter \
104 -I$(top_builddir)/clutter/cogl
106 test_conformance_CPPFLAGS = \
107 -DG_DISABLE_SINGLE_INCLUDES \
108 -DCOGL_ENABLE_EXPERIMENTAL_API \
109 -DCOGL_DISABLE_DEPRECATED \
110 -DCLUTTER_DISABLE_DEPRECATED \
111 -DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\"
113 test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
115 test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
117 test_conformance_LDFLAGS = -export-dynamic
120 @$(top_srcdir)/tests/conform/run-tests.sh \
121 ./test-conformance$(EXEEXT) -o test-report.xml
123 test-verbose: wrappers
124 @$(top_srcdir)/tests/conform/run-tests.sh \
125 ./test-conformance$(EXEEXT) -o test-report.xml --verbose
128 GTESTER_REPORT = gtester-report
130 # XXX: we could prevent the conformance test suite from running
131 # by simply defining this variable conditionally
132 TEST_PROGS = test-conformance
135 .PHONY: test-report perf-report full-report
136 .PHONY: test-report-npot perf-report-npot full-report-npot
138 # test-report: run tests and generate report
139 # perf-report: run tests with -m perf and generate report
140 # full-report: like test-report: with -m perf and -m slow
141 test-report perf-report full-report: ${TEST_PROGS}
142 @test -z "${TEST_PROGS}" || { \
143 export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
145 test-report) test_options="-k";; \
146 perf-report) test_options="-k -m=perf";; \
147 full-report) test_options="-k -m=perf -m=slow";; \
149 $(top_srcdir)/tests/conform/run-tests.sh \
150 ./test-conformance$(EXEEXT) \
153 -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
154 echo '<?xml version="1.0"?>' > $@.xml ; \
155 echo '<report-collection>' >> $@.xml ; \
156 echo '<info>' >> $@.xml ; \
157 echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
158 echo ' <version>$(VERSION)</version>' >> $@.xml ; \
159 echo '</info>' >> $@.xml ; \
160 for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
161 sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
164 echo '</report-collection>' >> $@.xml ; \
165 ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
166 rm -rf "$$GTESTER_LOGDIR" ; \
169 # same as above, but with a wrapper that forcibly disables non-power of
171 test-report-npot perf-report-npot full-report-npot: ${TEST_PROGS}
172 @test -z "${TEST_PROGS}" || { \
173 $(top_srcdir)/tests/tools/disable-npots.sh ; \
174 export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
176 test-report-npot) test_options="-k";; \
177 perf-report-npot) test_options="-k -m=perf";; \
178 full-report-npot) test_options="-k -m=perf -m=slow";; \
180 $(top_srcdir)/tests/conform/run-tests.sh \
181 ./test-conformance$(EXEEXT) \
184 -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
185 echo '<?xml version="1.0"?>' > $@.xml ; \
186 echo '<report-collection>' >> $@.xml ; \
187 echo '<info>' >> $@.xml ; \
188 echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
189 echo ' <version>$(VERSION)</version>' >> $@.xml ; \
190 echo '</info>' >> $@.xml ; \
191 for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
192 sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
195 echo '</report-collection>' >> $@.xml ; \
196 ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
197 rm -rf "$$GTESTER_LOGDIR" ; \
204 test-report-npot.xml \
205 perf-report-npot.xml \
212 test-report-npot.html \
213 perf-report-npot.html \
214 full-report-npot.html
216 EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh.in run-tests.sh
217 DISTCLEANFILES = test-launcher.sh
219 # we override the clean-generic target to clean up the wrappers so
220 # we cannot use CLEANFILES
221 clean-generic: clean-wrappers
222 $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)