~ubuntu-branches/ubuntu/vivid/clutter-1.0/vivid-proposed

« back to all changes in this revision

Viewing changes to tests/conform/Makefile.am

  • Committer: Package Import Robot
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2014-03-26 11:51:28 UTC
  • mfrom: (1.5.1) (4.1.30 experimental)
  • Revision ID: package-import@ubuntu.com-20140326115128-timmbsde8734o6wz
Tags: 1.18.0-1
* New upstream release.
* debian/control.in:
  + Bump gtk-doc-tools build dependency.
  + Also break libcogl15.
  + Standards-Version is 3.9.5, no changes needed.
* debian/libclutter-1.0-0.symbols:
  + Drop a few symbols that were accidentally exported in the DSO because
    they had a clutter_ prefix but were not in the public headers.
  + Add one new symbol.
  + Drop unnecessary debian revisions from some symbols.
* debian/control.in,
  debian/rules,
  debian/libclutter-1.0-0.symbols:
  + Temporarily disable evdev input support. It was only enabled in 1.17.6-1
    in experimental and there is nothing using it yet, and I would like to
    wait a bit before uploading libinput to unstable as the ABI isn't stable
    yet.
* d/p/0001-wayland-Add-missing-CLUTTER_AVAILABLE-annotations.patch:
  + Add missing annotations so that a few symbols are exported in the DSO.

* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
include $(top_srcdir)/build/autotools/Makefile.am.silent
2
 
 
3
 
NULL =
4
 
 
5
 
noinst_PROGRAMS = test-conformance
6
 
 
7
 
# the common sources
8
 
common_sources = \
9
 
        test-conform-common.h   \
10
 
        test-conform-common.c   \
11
 
        test-conform-main.c     \
12
 
        $(NULL)
13
 
 
14
 
# the unit-specific sources; please: keep all sections in alphabetical order!
15
 
units_sources =
16
 
 
17
 
# animation tests
18
 
units_sources += \
19
 
        animator.c                      \
20
 
        behaviours.c                    \
21
 
        score.c                         \
22
 
        state.c                         \
23
 
        timeline.c                      \
24
 
        timeline-interpolate.c          \
25
 
        timeline-progress.c             \
26
 
        timeline-rewind.c               \
27
 
        $(NULL)
28
 
 
29
 
# cogl tests
30
 
units_sources += \
31
 
        test-cogl-fixed.c                       \
32
 
        test-cogl-materials.c                   \
33
 
        test-cogl-viewport.c                    \
34
 
        test-cogl-multitexture.c                \
35
 
        test-cogl-npot-texture.c                \
36
 
        test-cogl-object.c                      \
37
 
        test-cogl-premult.c                     \
38
 
        test-cogl-readpixels.c                  \
39
 
        test-cogl-texture-get-set-data.c        \
40
 
        test-cogl-texture-mipmaps.c             \
41
 
        test-cogl-texture-pixmap-x11.c          \
42
 
        test-cogl-texture-rectangle.c           \
43
 
        test-cogl-atlas-migration.c             \
44
 
        test-cogl-vertex-buffer-contiguous.c    \
45
 
        test-cogl-vertex-buffer-interleved.c    \
46
 
        test-cogl-vertex-buffer-mutability.c    \
47
 
        $(NULL)
48
 
 
49
 
# actors tests
50
 
units_sources += \
51
 
        actor-anchors.c                 \
52
 
        actor-graph.c                   \
53
 
        actor-destroy.c                 \
54
 
        actor-invariants.c              \
55
 
        actor-iter.c                    \
56
 
        actor-layout.c                  \
57
 
        actor-offscreen-redirect.c      \
58
 
        actor-offscreen-limit-max-size.c\
59
 
        actor-paint-opacity.c           \
60
 
        actor-pick.c                    \
61
 
        actor-shader-effect.c           \
62
 
        actor-size.c                    \
63
 
        binding-pool.c                  \
64
 
        cairo-texture.c                 \
65
 
        group.c                         \
66
 
        interval.c                      \
67
 
        path.c                          \
68
 
        rectangle.c                     \
69
 
        texture-fbo.c                   \
70
 
        texture.c                       \
71
 
        text-cache.c                    \
72
 
        text.c                          \
73
 
        $(NULL)
74
 
 
75
 
# objects tests
76
 
units_sources += \
77
 
        color.c                         \
78
 
        model.c                         \
79
 
        script-parser.c                 \
80
 
        units.c                         \
81
 
        $(NULL)
82
 
 
83
 
# cally tests
84
 
units_sources += \
85
 
        cally-text.c                    \
86
 
        $(NULL)
87
 
 
88
 
# events tests
89
 
units_sources += \
90
 
        events-touch.c                  \
91
 
        $(NULL)
92
 
 
93
 
test_conformance_SOURCES = $(common_sources) $(units_sources)
94
 
 
95
 
if OS_WIN32
96
 
SHEXT =
97
 
else
98
 
SHEXT = $(EXEEXT)
99
 
endif
100
 
 
101
 
# For convenience, this provides a way to easily run individual unit tests:
102
 
.PHONY: wrappers clean-wrappers
103
 
 
104
 
#UNIT_TESTS = `./test-conformance -l -m thorough | $(GREP) '^/'`
105
 
 
106
 
wrappers: stamp-test-conformance
107
 
        @true
108
 
stamp-test-conformance: Makefile $(srcdir)/test-conform-main.c
109
 
        @mkdir -p wrappers
110
 
        @sed -n \
111
 
                -e 's/^ \{1,\}TEST_CONFORM_SIMPLE *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
112
 
                -e 's/^ \{1,\}TEST_CONFORM_SKIP *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
113
 
                -e 's/^ \{1,\}TEST_CONFORM_TODO *(.*"\([^",]\{1,\}\)", *\([a-zA-Z0-9_]\{1,\}\).*/\/conform\1\/\2/p' \
114
 
        $(srcdir)/test-conform-main.c > unit-tests
115
 
        @chmod +x test-launcher.sh
116
 
        @( echo "/stamp-test-conformance" ; \
117
 
           echo "/test-conformance" ; \
118
 
           echo "*.o" ; \
119
 
           echo "*.xml" ; \
120
 
           echo "*.html" ; \
121
 
           echo ".gitignore" ; \
122
 
           echo "unit-tests" ; \
123
 
           echo "/wrappers/" ) > .gitignore
124
 
        @for i in `cat unit-tests`; \
125
 
        do \
126
 
                unit=`basename $$i | sed -e s/_/-/g`; \
127
 
                echo "  GEN    $$unit"; \
128
 
                ( echo "#!/bin/sh" ; echo "$(abs_builddir)/test-launcher.sh '$$i' \"\$$@\"" ) > $$unit$(SHEXT) ; \
129
 
                ( echo "#!/bin/sh" ; echo "exec $(abs_builddir)/test-conformance$(EXEEXT) -p $$i \"\$$@\"" ) > wrappers/$$unit$(SHEXT) ; \
130
 
                ( echo "test-conformance-clutter$(EXEEXT) -p $$i" ) > $(top_builddir)/build/win32/$$unit-clutter.bat ; \
131
 
                ( echo "test-conformance-clutter$(EXEEXT) -p $$i" ) >> $(top_builddir)/build/win32/test-conformance-clutter.bat ; \
132
 
                chmod +x $$unit$(SHEXT); \
133
 
                chmod +x wrappers/$$unit$(SHEXT); \
134
 
                echo "/$$unit$(SHEXT)" >> .gitignore; \
135
 
        done \
136
 
        && echo timestamp > $(@F)
137
 
 
138
 
clean-wrappers:
139
 
        @for i in `cat unit-tests`; \
140
 
        do \
141
 
                unit=`basename $$i | sed -e s/_/-/g`; \
142
 
                echo "  RM     $$unit"; \
143
 
                rm -f $$unit$(SHEXT) ; \
144
 
                rm -f wrappers/$$unit$(SHEXT) ; \
145
 
        done \
146
 
        && rm -f unit-tests \
147
 
        && rm -f $(top_builddir)/build/win32/*.bat \
148
 
        && rm -f stamp-test-conformance
149
 
 
150
 
# NB: BUILT_SOURCES here a misnomer. We aren't building source, just inserting
151
 
# a phony rule that will generate symlink scripts for running individual tests
152
 
BUILT_SOURCES = wrappers
153
 
 
154
 
INCLUDES = \
155
 
        -I$(top_srcdir) \
156
 
        -I$(top_builddir) \
157
 
        -I$(top_srcdir)/clutter \
158
 
        -I$(top_builddir)/clutter
159
 
 
160
 
test_conformance_CPPFLAGS = \
161
 
        -DG_DISABLE_SINGLE_INCLUDES \
162
 
        -DCOGL_ENABLE_EXPERIMENTAL_API \
163
 
        -DG_DISABLE_DEPRECATION_WARNINGS \
164
 
        -DCLUTTER_DISABLE_DEPRECATION_WARNINGS \
165
 
        -DTESTS_DATADIR=\""$(top_srcdir)/tests/data"\"
166
 
 
167
 
test_conformance_CFLAGS = -g $(CLUTTER_CFLAGS)
168
 
 
169
 
test_conformance_LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_API_VERSION@.la $(CLUTTER_LIBS) -lm
170
 
 
171
 
test_conformance_LDFLAGS = -export-dynamic
172
 
 
173
 
test: wrappers
174
 
        @$(top_srcdir)/tests/conform/run-tests.sh \
175
 
          ./test-conformance$(EXEEXT) -o test-report.xml
176
 
 
177
 
test-verbose: wrappers
178
 
        @$(top_srcdir)/tests/conform/run-tests.sh \
179
 
          ./test-conformance$(EXEEXT) -o test-report.xml --verbose
180
 
 
181
 
GTESTER = gtester
182
 
GTESTER_REPORT = gtester-report
183
 
 
184
 
# XXX: we could prevent the conformance test suite from running
185
 
#      by simply defining this variable conditionally
186
 
TEST_PROGS = test-conformance
187
 
 
188
 
.PHONY: test
189
 
.PHONY: test-report perf-report full-report
190
 
.PHONY: test-report-npot perf-report-npot full-report-npot
191
 
 
192
 
# test-report: run tests and generate report
193
 
# perf-report: run tests with -m perf and generate report
194
 
# full-report: like test-report: with -m perf and -m slow
195
 
test-report perf-report full-report:    ${TEST_PROGS}
196
 
        @test -z "${TEST_PROGS}" || { \
197
 
          export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
198
 
          if test -d "$(top_srcdir)/.git"; then \
199
 
            export REVISION="`git describe`" ;  \
200
 
          else \
201
 
            export REVISION="$(VERSION) $(CLUTTER_RELEASE_STATUS)" ; \
202
 
          fi ; \
203
 
          export TIMESTAMP=`date +%Y-%m-%dT%H:%M:%S%z` ; \
204
 
          case $@ in \
205
 
          test-report) test_options="-k";; \
206
 
          perf-report) test_options="-k -m=perf";; \
207
 
          full-report) test_options="-k -m=perf -m=slow";; \
208
 
          esac ; \
209
 
          $(top_srcdir)/tests/conform/run-tests.sh \
210
 
            ./test-conformance$(EXEEXT) \
211
 
            --verbose \
212
 
            $$test_options \
213
 
            -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
214
 
          echo '<?xml version="1.0"?>'              > $@.xml ; \
215
 
          echo '<report-collection>'               >> $@.xml ; \
216
 
          echo '<info>'                            >> $@.xml ; \
217
 
          echo '  <package>$(PACKAGE)</package>'   >> $@.xml ; \
218
 
          echo '  <version>$(VERSION)</version>'   >> $@.xml ; \
219
 
          echo "  <revision>$$REVISION</revision>" >> $@.xml ; \
220
 
          echo "  <date>$$TIMESTAMP</date>"        >> $@.xml ; \
221
 
          echo '</info>'                           >> $@.xml ; \
222
 
          for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
223
 
            sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
224
 
          done ; \
225
 
          echo >> $@.xml ; \
226
 
          echo '</report-collection>' >> $@.xml ; \
227
 
          ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
228
 
          rm -rf "$$GTESTER_LOGDIR" ; \
229
 
        }
230
 
 
231
 
# same as above, but with a wrapper that forcibly disables non-power of
232
 
# two textures
233
 
test-report-npot perf-report-npot full-report-npot:     ${TEST_PROGS}
234
 
        @test -z "${TEST_PROGS}" || { \
235
 
          export COGL_DEBUG="$COGL_DEBUG,disable-npot-textures"; \
236
 
          export GTESTER_LOGDIR=`mktemp -d "$(srcdir)/.testlogs-XXXXXX"` ; \
237
 
          if test -d "$(top_srcdir)/.git"; then \
238
 
            export REVISION="`git describe`" ;  \
239
 
          else \
240
 
            export REVISION="$(VERSION) $(CLUTTER_RELEASE_STATUS)" ; \
241
 
          fi ; \
242
 
          export TIMESTAMP=`date +%Y-%m-%dT%H:%M:%S%z` ; \
243
 
          case $@ in \
244
 
          test-report-npot) test_options="-k";; \
245
 
          perf-report-npot) test_options="-k -m=perf";; \
246
 
          full-report-npot) test_options="-k -m=perf -m=slow";; \
247
 
          esac ; \
248
 
          $(top_srcdir)/tests/conform/run-tests.sh \
249
 
            ./test-conformance$(EXEEXT) \
250
 
            --verbose \
251
 
            $$test_options \
252
 
            -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ; \
253
 
          echo '<?xml version="1.0"?>'              > $@.xml ; \
254
 
          echo '<report-collection>'               >> $@.xml ; \
255
 
          echo '<info>'                            >> $@.xml ; \
256
 
          echo '  <package>$(PACKAGE)</package>'   >> $@.xml ; \
257
 
          echo '  <version>$(VERSION)</version>'   >> $@.xml ; \
258
 
          echo "  <revision>$$REVISION</revision>" >> $@.xml ; \
259
 
          echo "  <date>$$TIMESTAMP</date>"        >> $@.xml ; \
260
 
          echo '</info>'                           >> $@.xml ; \
261
 
          for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
262
 
            sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
263
 
          done ; \
264
 
          echo >> $@.xml ; \
265
 
          echo '</report-collection>' >> $@.xml ; \
266
 
          ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
267
 
          rm -rf "$$GTESTER_LOGDIR" ; \
268
 
        }
269
 
 
270
 
XML_REPORTS = \
271
 
        test-report.xml         \
272
 
        perf-report.xml         \
273
 
        full-report.xml         \
274
 
        test-report-npot.xml    \
275
 
        perf-report-npot.xml    \
276
 
        full-report-npot.xml
277
 
 
278
 
HTML_REPORTS = \
279
 
        test-report.html        \
280
 
        perf-report.html        \
281
 
        full-report.html        \
282
 
        test-report-npot.html   \
283
 
        perf-report-npot.html   \
284
 
        full-report-npot.html
285
 
 
286
 
EXTRA_DIST = ADDING_NEW_TESTS test-launcher.sh.in run-tests.sh
287
 
DISTCLEANFILES = test-launcher.sh .gitignore
288
 
 
289
 
dist-hook: $(top_builddir)/build/win32/vs9/test-conformance-clutter.vcproj $(top_builddir)/build/win32/vs10/test-conformance-clutter.vcxproj $(top_builddir)/build/win32/vs10/test-conformance-clutter.vcxproj.filters
290
 
 
291
 
$(top_builddir)/build/win32/vs9/test-conformance-clutter.vcproj: $(top_srcdir)/build/win32/vs9/test-conformance-clutter.vcprojin
292
 
        @for F in $(test_conformance_SOURCES); do \
293
 
                case $$F in \
294
 
                *.c)    echo '   <File RelativePath="..\..\..\tests\conform\'$$F'" />' \
295
 
                        ;; \
296
 
                esac; \
297
 
        done > testconformance.sourcefiles
298
 
        $(CPP) -P - <$(top_srcdir)/build/win32/vs9/test-conformance-clutter.vcprojin >$@
299
 
        rm -f testconformance.sourcefiles
300
 
 
301
 
$(top_builddir)/build/win32/vs10/test-conformance-clutter.vcxproj: $(top_srcdir)/build/win32/vs10/test-conformance-clutter.vcxprojin
302
 
        @for F in $(test_conformance_SOURCES); do \
303
 
                case $$F in \
304
 
                *.c)    echo '    <ClCompile Include="..\..\..\tests\conform\'$$F'" />' \
305
 
                        ;; \
306
 
                esac; \
307
 
        done >testconformance.vs10.sourcefiles
308
 
        $(CPP) -P - <$(top_srcdir)/build/win32/vs10/test-conformance-clutter.vcxprojin >$@
309
 
        rm -f testconformance.vs10.sourcefiles
310
 
        
311
 
$(top_builddir)/build/win32/vs10/test-conformance-clutter.vcxproj.filters: $(top_srcdir)/build/win32/vs10/test-conformance-clutter.vcxproj.filtersin
312
 
        @for F in $(test_conformance_SOURCES); do \
313
 
                case $$F in \
314
 
                *.c)    echo '    <ClCompile Include="..\..\..\tests\conform\'$$F'"><Filter>Sources</Filter></ClCompile>' \
315
 
                        ;; \
316
 
                esac; \
317
 
        done > testconformance.vs10.sourcefiles.filters
318
 
        $(CPP) -P - < $(top_srcdir)/build/win32/vs10/test-conformance-clutter.vcxproj.filtersin > $@
319
 
        rm -f testconformance.vs10.sourcefiles.filters
320
 
 
321
 
# Let the VS9/VS10 Project files be cleared out before they are re-expanded...
322
 
DISTCLEANFILES += \
323
 
        $(top_builddir)/build/win32/vs9/test-conformance-clutter.vcproj \
324
 
        $(top_builddir)/build/win32/vs10/test-conformance-clutter.vcxproj \
325
 
        $(top_builddir)/build/win32/vs10/test-conformance-clutter.vcxproj.filters
326
 
 
327
 
# we override the clean-generic target to clean up the wrappers so
328
 
# we cannot use CLEANFILES
329
 
clean-generic: clean-wrappers
330
 
        $(QUIET_RM)rm -f $(XML_REPORTS) $(HTML_REPORTS)
 
1
include $(top_srcdir)/build/autotools/glib-tap.mk
 
2
 
 
3
AM_CFLAGS = -g $(CLUTTER_CFLAGS) $(MAINTAINER_CFLAGS)
 
4
LDADD = $(top_builddir)/clutter/libclutter-1.0.la $(CLUTTER_LIBS) -lm
 
5
AM_LDFLAGS = -export-dynamic
 
6
AM_CPPFLAGS = \
 
7
        -DG_LOG_DOMAIN=\"Clutter-Conform\"      \
 
8
        -I$(top_srcdir)                         \
 
9
        -I$(top_builddir)                       \
 
10
        -DCOGL_DISABLE_DEPRECATION_WARNINGS     \
 
11
        $(CLUTTER_DEPRECATED_CFLAGS)            \
 
12
        $(CLUTTER_DEBUG_CFLAGS)                 \
 
13
        $(CLUTTER_PROFILE_CFLAGS)
 
14
 
 
15
# Basic actor API
 
16
actor_tests = \
 
17
        actor-anchors \
 
18
        actor-destroy \
 
19
        actor-graph \
 
20
        actor-invariants \
 
21
        actor-iter \
 
22
        actor-layout \
 
23
        actor-meta \
 
24
        actor-offscreen-limit-max-size \
 
25
        actor-offscreen-redirect \
 
26
        actor-paint-opacity \
 
27
        actor-pick \
 
28
        actor-shader-effect \
 
29
        actor-size \
 
30
        $(NULL)
 
31
 
 
32
# Actor classes
 
33
classes_tests = \
 
34
        text \
 
35
        $(NULL)
 
36
 
 
37
# General API
 
38
general_tests = \
 
39
        binding-pool \
 
40
        color \
 
41
        events-touch \
 
42
        interval \
 
43
        model \
 
44
        script-parser \
 
45
        units \
 
46
        $(NULL)
 
47
 
 
48
# Test for deprecated functionality
 
49
deprecated_tests = \
 
50
        animator \
 
51
        behaviours \
 
52
        group \
 
53
        rectangle \
 
54
        texture \
 
55
        $(NULL)
 
56
 
 
57
test_programs = $(actor_tests) $(general_tests) $(classes_tests) $(deprecated_tests)
 
58
 
 
59
dist_test_data = $(script_ui_files)
 
60
script_ui_files = $(addprefix scripts/,$(script_tests))
 
61
script_tests = \
 
62
        test-animator-1.json \
 
63
        test-animator-2.json \
 
64
        test-animator-3.json \
 
65
        test-script-animation.json \
 
66
        test-script-child.json \
 
67
        test-script-implicit-alpha.json \
 
68
        test-script-interval.json \
 
69
        test-script-layout-property.json \
 
70
        test-script-margin.json \
 
71
        test-script-model.json \
 
72
        test-script-named-object.json \
 
73
        test-script-object-property.json \
 
74
        test-script-single.json \
 
75
        test-script-timeline-markers.json \
 
76
        test-state-1.json
 
77
 
 
78
# simple rules for generating a Git ignore file for the conformance test suite
 
79
$(srcdir)/.gitignore: Makefile
 
80
        $(AM_V_GEN)( echo "/*.trs" ; \
 
81
                     echo "/*.log" ; \
 
82
                     echo "/*.test" ; \
 
83
                     echo "/.gitignore" ; \
 
84
                     for p in $(test_programs); do \
 
85
                        echo "/$$p" ; \
 
86
                     done ) > $(@F)
 
87
 
 
88
gitignore: $(srcdir)/.gitignore
 
89
 
 
90
all-am: gitignore
 
91
 
 
92
DISTCLEANFILES += .gitignore