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-wrap-modes.c \
31 test-cogl-pixel-buffer.c \
35 test-clutter-rectangle.c \
36 test-actor-invariants.c \
37 test-paint-opacity.c \
44 test-clutter-units.c \
48 test-cogl-sub-texture.c \
49 test-script-parser.c \
50 test-actor-destroy.c \
55 # For convenience, this provides a way to easily run individual unit tests:
56 .PHONY: wrappers clean-wrappers
58 UNIT_TESTS = `./test-conformance -l -m thorough | $(GREP) '^/'`
60 wrappers: stamp-test-conformance
62 stamp-test-conformance: test-conformance$(EXEEXT)
64 @for i in $(UNIT_TESTS); \
66 unit=`basename $$i | sed -e s/_/-/g`; \
68 ( echo "#!/bin/sh" ; echo "$(top_srcdir)/tests/conform/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(EXEEXT) ; \
69 ( echo "#!/bin/sh" ; echo "exec ./test-conformance$(EXEEXT) -p $$i \"\$$@\"" ) > wrappers/$$unit$(EXEEXT) ; \
70 chmod +x $$unit$(EXEEXT); \
71 chmod +x wrappers/$$unit$(EXEEXT); \
73 && echo timestamp > $(@F)
76 @for i in $(UNIT_TESTS); \
78 unit=`basename $$i | sed -e s/_/-/g`; \
80 rm -f $$unit$(EXEEXT) ; \
81 rm -f wrappers/$$unit$(EXEEXT) ; \
83 && rm -f stamp-test-conformance
85 # NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
86 # a phony rule that will generate symlink scripts for running individual tests
87 BUILT_SOURCES = wrappers
91 -I$(top_srcdir)/clutter \
92 -I$(top_srcdir)/clutter/cogl \
93 -I$(top_builddir)/clutter \
94 -I$(top_builddir)/clutter/cogl
96 test_conformance_CPPFLAGS = \
97 -DG_DISABLE_SINGLE_INCLUDES \
98 -DCOGL_ENABLE_EXPERIMENTAL_API \
99 -DCOGL_DISABLE_DEPRECATED \
100 -DCLUTTER_DISABLE_DEPRECATED \
101 -DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\"
103 test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
105 test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_WINSYS@-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS)
107 test_conformance_LDFLAGS = -rdynamic
110 .PHONY: test-report test-report-normal test-report-disable-npots
111 .PHONY: full-report full-report-normal full-report-disable-npots
112 .PHONY: full-report-generate
115 @$(top_srcdir)/tests/conform/run-tests.sh \
116 ./test-conformance$(EXEEXT) test-conformance-results.xml
118 test-verbose: wrappers
119 @$(top_srcdir)/tests/conform/run-tests.sh \
120 ./test-conformance$(EXEEXT) test-conformance-results.xml --verbose
122 test-report-normal: wrappers
123 @$(top_srcdir)/tests/conform/run-tests.sh \
124 ./test-conformance$(EXEEXT) test-conformance-results.xml -k \
125 && ( gtester-report test-conformance-results.xml \
126 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
127 > test-conformance-results.html ) \
128 && gnome-open ./test-conformance-results.html
130 test-report-disable-npots: wrappers
131 @../tools/disable-npots.sh \
132 $(top_srcdir)/tests/conform/run-tests.sh \
133 ./test-conformance$(EXEEXT) test-conformance-results-dn.xml -k \
134 && ( gtester-report test-conformance-results-dn.xml \
135 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
136 > test-conformance-results-dn.html ) \
137 && gnome-open ./test-conformance-results-dn.html
139 test-report: test-report-normal
141 full-report-normal: wrappers
142 @$(top_srcdir)/tests/conform/run-tests.sh \
143 ./test-conformance$(EXEEXT) test-conformance-results.xml -k -m=slow \
144 && ( gtester-report test-conformance-results.xml \
145 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (normal)</' \
146 > test-conformance-results.html )
148 full-report-disable-npots: wrappers
149 @../tools/disable-npots.sh \
150 $(top_srcdir)/tests/conform/run-tests.sh \
151 ./test-conformance$(EXEEXT) test-conformance-results-dn.xml -k -m=slow \
152 && ( gtester-report test-conformance-results-dn.xml \
153 | sed 's/>GTester Unit Test Report</>GTester Unit Test Report (no NPOTs)</' \
154 > test-conformance-results-dn.html )
156 XML_REPORTS = test-conformance-results.xml
157 HTML_REPORTS = test-conformance-results.html
160 XML_REPORTS += test-conformance-results-dn.xml
161 HTML_REPORTS += test-conformance-results-dn.html
162 full-report-generate: full-report-normal full-report-disable-npots
165 full-report-generate: full-report-normal
169 full-report: full-report-generate
170 @for x in $(HTML_REPORTS); do \
174 EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh run-tests.sh
176 # we override the clean-generic target to clean up the wrappers so
177 # we cannot use CLEANFILES
178 clean-generic: clean-wrappers
179 $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)