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-wrap-modes.c \
32 test-cogl-pixel-buffer.c \
35 test-cogl-depth-test.c \
38 test-clutter-rectangle.c \
39 test-actor-invariants.c \
40 test-paint-opacity.c \
43 test-clutter-cairo-texture.c \
48 test-clutter-units.c \
52 test-cogl-sub-texture.c \
53 test-script-parser.c \
54 test-actor-destroy.c \
58 test-clutter-texture.c \
61 # For convenience, this provides a way to easily run individual unit tests:
62 .PHONY: wrappers clean-wrappers
64 UNIT_TESTS = `./test-conformance -l -m thorough | $(GREP) '^/'`
66 wrappers: stamp-test-conformance
68 stamp-test-conformance: test-conformance$(EXEEXT)
70 @chmod +x test-launcher.sh
71 @for i in $(UNIT_TESTS); \
73 unit=`basename $$i | sed -e s/_/-/g`; \
75 ( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(EXEEXT) ; \
76 ( echo "#!/bin/sh" ; echo "exec ./test-conformance$(EXEEXT) -p $$i \"\$$@\"" ) > wrappers/$$unit$(EXEEXT) ; \
77 chmod +x $$unit$(EXEEXT); \
78 chmod +x wrappers/$$unit$(EXEEXT); \
80 && echo timestamp > $(@F)
83 @for i in $(UNIT_TESTS); \
85 unit=`basename $$i | sed -e s/_/-/g`; \
87 rm -f $$unit$(EXEEXT) ; \
88 rm -f wrappers/$$unit$(EXEEXT) ; \
90 && rm -f stamp-test-conformance
92 # NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
93 # a phony rule that will generate symlink scripts for running individual tests
94 BUILT_SOURCES = wrappers
98 -I$(top_srcdir)/clutter \
99 -I$(top_srcdir)/clutter/cogl \
100 -I$(top_builddir)/clutter \
101 -I$(top_builddir)/clutter/cogl
103 test_conformance_CPPFLAGS = \
104 -DG_DISABLE_SINGLE_INCLUDES \
105 -DCOGL_ENABLE_EXPERIMENTAL_API \
106 -DCOGL_DISABLE_DEPRECATED \
107 -DCLUTTER_DISABLE_DEPRECATED \
108 -DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\"
110 test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
112 test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_SONAME_INFIX@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
114 test_conformance_LDFLAGS = -export-dynamic
117 .PHONY: test-report test-report-normal test-report-disable-npots
118 .PHONY: full-report full-report-normal full-report-disable-npots
119 .PHONY: full-report-generate
122 @$(top_srcdir)/tests/conform/run-tests.sh \
123 ./test-conformance$(EXEEXT) test-conformance-results.xml
125 test-verbose: wrappers
126 @$(top_srcdir)/tests/conform/run-tests.sh \
127 ./test-conformance$(EXEEXT) test-conformance-results.xml --verbose
129 test-report-normal: wrappers
130 @$(top_srcdir)/tests/conform/run-tests.sh \
131 ./test-conformance$(EXEEXT) test-conformance-results.xml -k \
132 && ( gtester-report test-conformance-results.xml \
133 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
134 > test-conformance-results.html ) \
135 && gnome-open ./test-conformance-results.html
137 test-report-disable-npots: wrappers
138 @../tools/disable-npots.sh \
139 $(top_srcdir)/tests/conform/run-tests.sh \
140 ./test-conformance$(EXEEXT) test-conformance-results-dn.xml -k \
141 && ( gtester-report test-conformance-results-dn.xml \
142 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
143 > test-conformance-results-dn.html ) \
144 && gnome-open ./test-conformance-results-dn.html
146 test-report: test-report-normal
148 full-report-normal: wrappers
149 @$(top_srcdir)/tests/conform/run-tests.sh \
150 ./test-conformance$(EXEEXT) test-conformance-results.xml -k -m=slow \
151 && ( gtester-report test-conformance-results.xml \
152 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
153 > test-conformance-results.html )
155 full-report-disable-npots: wrappers
156 @../tools/disable-npots.sh \
157 $(top_srcdir)/tests/conform/run-tests.sh \
158 ./test-conformance$(EXEEXT) test-conformance-results-dn.xml -k -m=slow \
159 && ( gtester-report test-conformance-results-dn.xml \
160 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
161 > test-conformance-results-dn.html )
163 XML_REPORTS = test-conformance-results.xml
164 HTML_REPORTS = test-conformance-results.html
167 XML_REPORTS += test-conformance-results-dn.xml
168 HTML_REPORTS += test-conformance-results-dn.html
169 full-report-generate: full-report-normal full-report-disable-npots
172 full-report-generate: full-report-normal
176 full-report: full-report-generate
177 @for x in $(HTML_REPORTS); do \
181 EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh.in run-tests.sh
182 DISTCLEANFILES = test-launcher.sh
184 # we override the clean-generic target to clean up the wrappers so
185 # we cannot use CLEANFILES
186 clean-generic: clean-wrappers
187 $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)