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-pixmap-x11.c \
31 test-cogl-texture-get-set-data.c \
32 test-cogl-wrap-modes.c \
33 test-cogl-pixel-buffer.c \
36 test-cogl-depth-test.c \
39 test-clutter-rectangle.c \
40 test-actor-invariants.c \
41 test-paint-opacity.c \
44 test-clutter-cairo-texture.c \
49 test-clutter-units.c \
53 test-cogl-sub-texture.c \
54 test-script-parser.c \
55 test-actor-destroy.c \
59 test-clutter-texture.c \
62 # For convenience, this provides a way to easily run individual unit tests:
63 .PHONY: wrappers clean-wrappers
65 UNIT_TESTS = `./test-conformance -l -m thorough | $(GREP) '^/'`
67 wrappers: stamp-test-conformance
69 stamp-test-conformance: test-conformance$(EXEEXT)
71 @chmod +x test-launcher.sh
72 @for i in $(UNIT_TESTS); \
74 unit=`basename $$i | sed -e s/_/-/g`; \
76 ( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(EXEEXT) ; \
77 ( echo "#!/bin/sh" ; echo "exec ./test-conformance$(EXEEXT) -p $$i \"\$$@\"" ) > wrappers/$$unit$(EXEEXT) ; \
78 chmod +x $$unit$(EXEEXT); \
79 chmod +x wrappers/$$unit$(EXEEXT); \
81 && echo timestamp > $(@F)
84 @for i in $(UNIT_TESTS); \
86 unit=`basename $$i | sed -e s/_/-/g`; \
88 rm -f $$unit$(EXEEXT) ; \
89 rm -f wrappers/$$unit$(EXEEXT) ; \
91 && rm -f stamp-test-conformance
93 # NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
94 # a phony rule that will generate symlink scripts for running individual tests
95 BUILT_SOURCES = wrappers
99 -I$(top_srcdir)/clutter \
100 -I$(top_srcdir)/clutter/cogl \
101 -I$(top_builddir)/clutter \
102 -I$(top_builddir)/clutter/cogl
104 test_conformance_CPPFLAGS = \
105 -DG_DISABLE_SINGLE_INCLUDES \
106 -DCOGL_ENABLE_EXPERIMENTAL_API \
107 -DCOGL_DISABLE_DEPRECATED \
108 -DCLUTTER_DISABLE_DEPRECATED \
109 -DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\"
111 test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
113 test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
115 test_conformance_LDFLAGS = -export-dynamic
118 @$(top_srcdir)/tests/conform/run-tests.sh \
119 ./test-conformance$(EXEEXT) -o test-report.xml
121 test-verbose: wrappers
122 @$(top_srcdir)/tests/conform/run-tests.sh \
123 ./test-conformance$(EXEEXT) -o test-report.xml --verbose
126 GTESTER_REPORT = gtester-report
128 # XXX: we could prevent the conformance test suite from running
129 # by simply defining this variable conditionally
130 TEST_PROGS = test-conformance
133 .PHONY: test-report perf-report full-report
134 .PHONY: test-report-npot perf-report-npot full-report-npot
136 # test-report: run tests and generate report
137 # perf-report: run tests with -m perf and generate report
138 # full-report: like test-report: with -m perf and -m slow
139 test-report perf-report full-report: ${TEST_PROGS}
140 @test -z "${TEST_PROGS}" || { \
141 export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
143 test-report) test_options="-k";; \
144 perf-report) test_options="-k -m=perf";; \
145 full-report) test_options="-k -m=perf -m=slow";; \
147 $(top_srcdir)/tests/conform/run-tests.sh \
148 ./test-conformance$(EXEEXT) \
151 -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
152 echo '<?xml version="1.0"?>' > $@.xml ; \
153 echo '<report-collection>' >> $@.xml ; \
154 echo '<info>' >> $@.xml ; \
155 echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
156 echo ' <version>$(VERSION)</version>' >> $@.xml ; \
157 echo '</info>' >> $@.xml ; \
158 for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
159 sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
162 echo '</report-collection>' >> $@.xml ; \
163 ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
164 rm -rf "$$GTESTER_LOGDIR" ; \
167 # same as above, but with a wrapper that forcibly disables non-power of
169 test-report-npot perf-report-npot full-report-npot: ${TEST_PROGS}
170 @test -z "${TEST_PROGS}" || { \
171 $(top_srcdir)/tests/tools/disable-npots.sh ; \
172 export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
174 test-report-npot) test_options="-k";; \
175 perf-report-npot) test_options="-k -m=perf";; \
176 full-report-npot) test_options="-k -m=perf -m=slow";; \
178 $(top_srcdir)/tests/conform/run-tests.sh \
179 ./test-conformance$(EXEEXT) \
182 -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
183 echo '<?xml version="1.0"?>' > $@.xml ; \
184 echo '<report-collection>' >> $@.xml ; \
185 echo '<info>' >> $@.xml ; \
186 echo ' <package>$(PACKAGE)</package>' >> $@.xml ; \
187 echo ' <version>$(VERSION)</version>' >> $@.xml ; \
188 echo '</info>' >> $@.xml ; \
189 for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
190 sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
193 echo '</report-collection>' >> $@.xml ; \
194 ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
195 rm -rf "$$GTESTER_LOGDIR" ; \
202 test-report-npot.xml \
203 perf-report-npot.xml \
210 test-report-npot.html \
211 perf-report-npot.html \
212 full-report-npot.html
214 EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh.in run-tests.sh
215 DISTCLEANFILES = test-launcher.sh
217 # we override the clean-generic target to clean up the wrappers so
218 # we cannot use CLEANFILES
219 clean-generic: clean-wrappers
220 $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)