Merge remote-tracking branch 'origin/master' into 0.11
[platform/upstream/gst-plugins-good.git] / tests / check / Makefile.am
1 include $(top_srcdir)/common/check.mak
2
3 CHECK_REGISTRY = $(top_builddir)/tests/check/test-registry.reg
4 TEST_FILES_DIRECTORY = $(top_srcdir)/tests/files
5
6 REGISTRY_ENVIRONMENT = \
7         GST_REGISTRY=$(CHECK_REGISTRY)
8
9 TESTS_ENVIRONMENT = \
10         $(REGISTRY_ENVIRONMENT)                                 \
11         GST_PLUGIN_SYSTEM_PATH=                                 \
12         GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/ext:$(top_builddir)/sys:$(GSTPB_PLUGINS_DIR):$(GST_PLUGINS_DIR)                     \
13         GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good@$(top_builddir)"      \
14         GST_STATE_IGNORE_ELEMENTS="aasink autoaudiosrc autoaudiosink autovideosrc autovideosink \
15                 cacasink cairotextoverlay \
16                 halaudiosrc halaudiosink jackaudiosrc jackaudiosink \
17                 osssrc osssink osxaudiosink osxaudiosrc osxvideosrc osxvideosink \
18                 pulsesink pulsesrc pulsemixer v4l2src"
19
20 # fake device drivers: we could run hardware element tests against dummy drivers
21 # v4l2: vivo (part of normal kernel)
22 #   modprobe vivo;
23 #   gst-launch v4l2src device="/dev/video1" ! xvimagesink;
24 #   rmmod vivo
25 #
26 # alsa: snd-dummy (part of normal alsa, not removable)
27 #   modprobe snd-dummy;
28 #   gst-launch alsasrc device="hw:2" ! fakesink
29 #   gst-launch fakesrc ! alsasink device="hw:2"
30 #
31 # need a way to figure out value for the device property
32
33 # the core dumps of some machines have PIDs appended
34 CLEANFILES = core.* test-registry.*
35
36 clean-local: clean-local-check clean-local-orc
37
38 if USE_ANNODEX
39 check_annodex = \
40         elements/cmmldec \
41         elements/cmmlenc
42 else
43 check_annodex =
44 endif
45
46 if USE_FLAC
47 check_flac = pipelines/flacdec
48 else
49 check_flac =
50 endif
51
52 if USE_GDK_PIXBUF
53 check_gdkpixbuf = elements/gdkpixbufsink
54 else
55 check_gdkpixbuf =
56 endif
57
58 if USE_JPEG
59 check_jpeg = elements/jpegenc
60 else
61 check_jpeg =
62 endif
63
64 if USE_SOUP
65 check_soup = elements/souphttpsrc
66 else
67 check_soup =
68 endif
69
70 if USE_SUNAUDIO
71 check_sunaudio = elements/sunaudio
72 else
73 check_sunaudio =
74 endif
75
76 if USE_TAGLIB
77 check_taglib = \
78         elements/id3v2mux \
79         elements/apev2mux
80 else
81 check_taglib =
82 endif
83
84 if USE_WAVPACK
85 check_wavpack = \
86        elements/wavpackparse \
87        elements/wavpackdec \
88        elements/wavpackenc \
89        pipelines/wavpack
90 else
91 check_wavpack =
92 endif
93
94 if HAVE_ORC
95 check_orc = orc/deinterlace orc/videomixer orc/videobox
96 else
97 check_orc =
98 endif
99
100
101 check_PROGRAMS = \
102         generic/index \
103         generic/states \
104         elements/aacparse \
105         elements/ac3parse \
106         elements/amrparse \
107         $(check_annodex) \
108         elements/alphacolor \
109         elements/aspectratiocrop \
110         elements/audioamplify \
111         elements/audiochebband \
112         elements/audiocheblimit \
113         elements/audiodynamic \
114         elements/audioecho \
115         elements/audiofirfilter \
116         elements/audioiirfilter \
117         elements/audioinvert \
118         elements/audiopanorama \
119         elements/audiowsincband \
120         elements/audiowsinclimit \
121         elements/autodetect \
122         elements/avimux \
123         elements/avisubtitle \
124         elements/capssetter \
125         elements/deinterlace \
126         elements/deinterleave \
127         elements/equalizer \
128         elements/flacparse \
129         elements/flvdemux \
130         elements/flvmux \
131         elements/icydemux \
132         elements/id3demux \
133         elements/imagefreeze \
134         elements/interleave \
135         elements/level \
136         elements/matroskamux \
137         elements/matroskaparse \
138         elements/mpegaudioparse \
139         elements/multifile \
140         elements/qtmux \
141         elements/rganalysis \
142         elements/rglimiter \
143         elements/rgvolume \
144         elements/rtp-payloading \
145         elements/rtpbin \
146         elements/rtpbin_buffer_list \
147         elements/rtpjitterbuffer \
148         elements/shapewipe \
149         elements/spectrum \
150         elements/udpsink \
151         elements/videocrop \
152         elements/videofilter \
153         elements/y4menc \
154         pipelines/simple-launch-lines \
155         pipelines/effectv \
156         pipelines/tagschecking \
157         pipelines/wavenc \
158         $(check_flac) \
159         $(check_gdkpixbuf) \
160         $(check_jpeg) \
161         $(check_soup) \
162         $(check_sunaudio) \
163         $(check_taglib) \
164         $(check_wavpack) \
165         $(check_orc)
166
167 VALGRIND_TO_FIX = \
168         elements/rtp-payloading
169
170 TESTS = $(check_PROGRAMS)
171
172 AM_CFLAGS = $(GST_OBJ_CFLAGS) $(GST_CHECK_CFLAGS) $(CHECK_CFLAGS) \
173         $(GST_OPTION_CFLAGS) $(GST_CFLAGS) -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
174         -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
175 LDADD = $(GST_OBJ_LIBS) $(GST_CHECK_LIBS) $(CHECK_LIBS)
176
177 # valgrind testing
178 # videocrop disabled since it takes way too long in valgrind
179 VALGRIND_TESTS_DISABLE = \
180         elements/videocrop \
181         $(VALGRIND_TO_FIX)
182
183 SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-good.supp
184
185 # parser unit test convenience lib
186 noinst_LTLIBRARIES = libparser.la
187 libparser_la_SOURCES = elements/parser.c elements/parser.h
188 libparser_la_CFLAGS = \
189         -I$(top_srcdir)/tests/check \
190         $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS) -DGST_USE_UNSTABLE_API
191
192 elements_aacparse_LDADD = libparser.la $(LDADD)
193
194 elements_ac3parse_LDADD = libparser.la $(LDADD)
195
196 elements_amrparse_LDADD = libparser.la $(LDADD)
197
198 elements_flacparse_LDADD = libparser.la $(LDADD)
199
200 elements_mpegaudioparse_LDADD = libparser.la $(LDADD)
201
202 elements_aspectratiocrop_LDADD = $(LDADD)
203 elements_aspectratiocrop_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
204
205 elements_audioamplify_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
206 elements_audioamplify_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
207
208 elements_audiochebband_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
209 elements_audiochebband_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
210
211 elements_audiocheblimit_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
212 elements_audiocheblimit_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
213
214 elements_audiodynamic_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
215 elements_audiodynamic_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
216
217 elements_audioecho_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
218 elements_audioecho_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
219
220 elements_audiopanorama_LDADD = \
221         $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) \
222         $(LDADD)
223
224 elements_audiopanorama_CFLAGS = \
225         $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) \
226         $(CFLAGS) $(AM_CFLAGS)
227
228 elements_cmmldec_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
229 elements_cmmlenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
230
231 elements_alphacolor_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
232
233 elements_deinterlace_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
234 elements_deinterlace_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(LDADD)
235
236 elements_deinterleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
237 elements_deinterleave_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
238 elements_interleave_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
239 elements_interleave_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
240
241 elements_imagefreeze_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
242 elements_imagefreeze_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_BASE_LIBS) $(LDADD)
243
244 elements_jpegenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
245 elements_jpegenc_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstapp-0.10 $(GST_BASE_LIBS) $(LDADD)
246
247 elements_level_LDADD = $(LDADD) $(LIBM)
248
249 elements_matroskamux_LDADD = $(GST_BASE_LIBS) $(LDADD) $(LIBM)
250
251 elements_multifile_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
252 elements_multifile_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(GST_LIBS) $(LDADD) $(LIBM)
253
254 elements_qtmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
255 elements_qtmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-@GST_MAJORMINOR@ \
256              $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS)
257
258 elements_rtpbin_buffer_list_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) \
259         $(WARNING_CFLAGS) $(ERROR_CFLAGS) $(GST_CHECK_CFLAGS) $(AM_CFLAGS)
260 elements_rtpbin_buffer_list_LDADD = $(GST_PLUGINS_BASE_LIBS) \
261              -lgstnetbuffer-@GST_MAJORMINOR@ -lgstrtp-@GST_MAJORMINOR@ \
262              $(GST_BASE_LIBS) $(GST_LIBS) $(GST_CHECK_LIBS)
263 elements_rtpbin_buffer_list_SOURCES = elements/rtpbin_buffer_list.c
264
265 elements_souphttpsrc_CFLAGS = $(SOUP_CFLAGS) $(AM_CFLAGS)
266 elements_souphttpsrc_LDADD = $(SOUP_LIBS) $(LDADD)
267
268 elements_sunaudio_CFLAGS = \
269         $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) \
270         $(AM_CFLAGS)
271 elements_sunaudio_LDADD = \
272         $(GST_PLUGINS_BASE_LIBS) -lgstinterfaces-@GST_MAJORMINOR@ \
273         $(LDADD)
274
275 elements_videocrop_LDADD = $(GST_BASE_LIBS) $(LDADD)
276 elements_videocrop_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
277
278 elements_videofilter_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
279 elements_videofilter_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) $(LDADD)
280
281 # FIXME: configure should check for gdk-pixbuf not gtk
282 # only need video.h header, not the lib
283 elements_gdkpixbufsink_CFLAGS = \
284         $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS) $(GDK_PIXBUF_CFLAGS)
285 elements_gdkpixbufsink_LDADD = \
286         $(LDADD) $(GDK_PIXBUF_LIBS)
287
288
289 pipelines_wavenc_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
290 pipelines_wavenc_LDADD  = $(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) $(LDADD)
291
292 pipelines_wavpack_LDADD = $(LDADD) $(GST_BASE_LIBS)
293 pipelines_wavpack_CFLAGS = $(GST_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
294
295 orc_deinterlace_CFLAGS = $(ORC_CFLAGS)
296 orc_deinterlace_LDADD = $(ORC_LIBS) -lorc-test-0.4
297 nodist_orc_deinterlace_SOURCES = orc/deinterlace.c
298 orc_videomixer_CFLAGS = $(ORC_CFLAGS)
299 orc_videomixer_LDADD = $(ORC_LIBS) -lorc-test-0.4
300 nodist_orc_videomixer_SOURCES = orc/videomixer.c
301 orc_videobox_CFLAGS = $(ORC_CFLAGS)
302 orc_videobox_LDADD = $(ORC_LIBS) -lorc-test-0.4
303 nodist_orc_videobox_SOURCES = orc/videobox.c
304
305 orc/deinterlace.c: $(top_srcdir)/gst/deinterlace/tvtime.orc
306         $(MKDIR_P) orc/
307         $(ORCC) --test -o $@ $<
308
309 orc/videomixer.c: $(top_srcdir)/gst/videomixer/blendorc.orc
310         $(MKDIR_P) orc/
311         $(ORCC) --test -o $@ $<
312
313 orc/videobox.c: $(top_srcdir)/gst/videobox/gstvideoboxorc.orc
314         $(MKDIR_P) orc/
315         $(ORCC) --test -o $@ $<
316
317 clean-local-orc:
318         rm -rf orc
319
320 EXTRA_DIST = gst-plugins-good.supp