84cee4d25bed395041d7e4996cd3f78a31ffe6cd
[platform/upstream/gstreamer.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 GST_TOOLS_DIR = $(top_builddir)/tools
7
8 REGISTRY_ENVIRONMENT = \
9         GST_REGISTRY=$(CHECK_REGISTRY)
10
11 # GST_PLUGINS_XYZ_DIR is only set in an uninstalled setup
12 TESTS_ENVIRONMENT = \
13         $(REGISTRY_ENVIRONMENT)                                 \
14         GST_PLUGIN_SYSTEM_PATH=                                 \
15         GST_PLUGIN_PATH=$(top_builddir)/gst:$(top_builddir)/sys:$(top_builddir)/ext:$(GST_PLUGINS_FFMPEG_DIR):$(GST_PLUGINS_UGLY_DIR):$(GST_PLUGINS_GOOD_DIR):$(GST_PLUGINS_BASE_DIR):$(GST_PLUGINS_DIR) \
16         GST_PLUGIN_LOADING_WHITELIST="gstreamer@$(GST_PLUGINS_DIR):gst-plugins-base@$(GSTPB_PLUGINS_DIR):gst-plugins-good:gst-plugins-ugly:gst-ffmpeg:gst-plugins-bad@$(top_builddir)" \
17         GST_STATE_IGNORE_ELEMENTS="apexsink camerabin cdaudio dc1394src \
18             dccpclientsrc dccpclientsink dccpserversrc dccpserversink decklinksrc \
19             decklinksink dvbsrc dvbbasebin dfbvideosink festival gsettingsvideosrc \
20             gsettingsvideosink gsettingsaudiosrc gsettingsaudiosink linsyssdisrc linsyssdisink nassink \
21             rsndvdbin sdlaudiosink sdlvideosink vcdsrc rfbsrc vdpauyuvvideo vdpauvideoyuv \
22             vdpaumpegdec vdpaumpeg4dec vdpauh264dec vdpauvideopostprocess vdpausink neonhttpsrc"
23
24 plugindir = $(libdir)/gstreamer-@GST_API_VERSION@
25
26 # override to _not_ install the test plugins
27 install-pluginLTLIBRARIES:
28
29 # the core dumps of some machines have PIDs appended
30 CLEANFILES = core.* test-registry.*
31
32 SUPPRESSIONS = $(top_srcdir)/common/gst.supp $(srcdir)/gst-plugins-bad.supp
33
34 clean-local: clean-local-check clean-local-orc
35
36 if USE_ASSRENDER
37 check_assrender = elements/assrender
38 else
39 check_assrender =
40 endif
41
42 if USE_FAAC
43 check_faac = elements/faac
44 else
45 check_faac =
46 endif
47
48 if USE_FAAD
49 check_faad = elements/faad
50 else
51 check_faad =
52 endif
53
54 if USE_VOAACENC
55 check_voaacenc = elements/voaacenc
56 else
57 check_voaacenc =
58 endif
59
60 if USE_VOAMRWBENC
61 check_voamrwbenc = elements/voamrwbenc
62 else
63 check_voamrwbenc =
64 endif
65
66 if USE_EXIF
67 check_jifmux = elements/jifmux
68 else
69 check_jifmux =
70 endif
71
72 if USE_COG
73 check_logoinsert = elements/logoinsert
74 else
75 check_logoinsert =
76 endif
77
78 if USE_MPEG2ENC
79 check_mpeg2enc = elements/mpeg2enc
80 else
81 check_mpeg2enc =
82 endif
83
84 if USE_MPLEX
85 check_mplex = elements/mplex
86 else
87 check_mplex =
88 endif
89
90 if USE_NEON
91 check_neon = elements/neonhttpsrc
92 else
93 check_neon =
94 endif
95
96 if USE_OFA
97 check_ofa = elements/ofa
98 else
99 check_ofa =
100 endif
101
102 if USE_SCHRO
103 check_schro=elements/schroenc
104 else
105 check_schro=
106 endif
107
108 if USE_TIMIDITY
109 check_timidity=elements/timidity
110 else
111 check_timidity=
112 endif
113
114 if USE_KATE
115 check_kate=elements/kate
116 else
117 check_kate=
118 endif
119
120 if USE_MIMIC
121 check_mimic=pipelines/mimic
122 else
123 check_mimic=
124 endif
125
126 if USE_VP8
127 check_vp8=elements/vp8enc elements/vp8dec
128 else
129 check_vp8=
130 endif
131
132 if HAVE_ORC
133 check_orc = orc/cog orc/bayer
134 else
135 check_orc =
136 endif
137
138 if USE_ZBAR
139 check_zbar = elements/zbar
140 else
141 check_zbar =
142 endif
143
144 if USE_OPUS
145 check_opus = elements/opus
146 else
147 check_opus =
148 endif
149
150 if USE_CURL
151 check_curl = elements/curlhttpsink \
152         elements/curlfilesink \
153         elements/curlftpsink \
154         elements/curlsmtpsink
155 else
156 check_curl =
157 endif
158
159 VALGRIND_TO_FIX = \
160         elements/mpeg2enc \
161         elements/mplex    \
162         elements/zbar     \
163         pipeline/colorspace
164
165 # valgrind testing
166 VALGRIND_TESTS_DISABLE = \
167         $(VALGRIND_TO_FIX)
168
169 # these tests don't even pass
170 # neon: too flaky (almost always fails 'the first time')
171 # colorspace: bad memory accesses in orc code for odd width buffers - https://bugzilla.gnome.org/show_bug.cgi?id=663248
172 noinst_PROGRAMS = \
173         pipelines/colorspace \
174         $(check_neon)
175
176 check_PROGRAMS = \
177         generic/states \
178         $(check_assrender) \
179         $(check_faac)  \
180         $(check_faad)  \
181         $(check_voaacenc) \
182         $(check_voamrwbenc) \
183         $(check_mpeg2enc)  \
184         $(check_mplex)     \
185         $(check_ofa)        \
186         $(check_timidity)  \
187         $(check_kate)  \
188         $(check_opus)  \
189         $(check_curl) \
190         elements/autoconvert \
191         elements/autovideoconvert \
192         elements/asfmux \
193         elements/baseaudiovisualizer \
194         elements/camerabin \
195         elements/dataurisrc \
196         $(check_jifmux) \
197         elements/jpegparse \
198         $(check_logoinsert) \
199         elements/h263parse \
200         elements/h264parse \
201         elements/mpegtsmux \
202         elements/mpegvideoparse \
203         elements/mpeg4videoparse \
204         elements/mxfdemux \
205         elements/mxfmux \
206         elements/id3mux \
207         pipelines/mxf \
208         $(check_mimic) \
209         elements/rtpmux \
210         libs/mpegvideoparser \
211         libs/h264parser \
212         libs/vc1parser \
213         $(check_schro) \
214         $(check_vp8) \
215         elements/viewfinderbin \
216         $(check_zbar) \
217         $(check_orc) \
218         $(EXPERIMENTAL_CHECKS)
219
220 noinst_HEADERS = elements/mxfdemux.h
221
222 TESTS = $(check_PROGRAMS)
223
224 AM_CFLAGS = $(GST_CFLAGS) $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS) \
225                 -DGST_TEST_FILES_PATH="\"$(TEST_FILES_DIRECTORY)\"" \
226                 -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
227 LDADD = $(GST_CHECK_LIBS)
228
229 # parser unit test convenience lib
230 noinst_LTLIBRARIES = libparser.la
231 libparser_la_SOURCES = elements/parser.c elements/parser.h
232 libparser_la_CFLAGS = \
233         -I$(top_srcdir)/tests/check \
234         $(GST_CFLAGS) $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS)
235
236 elements_mpegvideoparse_LDADD = libparser.la $(LDADD)
237
238 elements_mpeg4videoparse_LDADD = libparser.la $(LDADD)
239
240 elements_h263parse_LDADD = libparser.la $(LDADD)
241
242 elements_h264parse_LDADD = libparser.la $(LDADD)
243
244 libs_mpegvideoparser_CFLAGS = \
245         $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
246         -DGST_USE_UNSTABLE_API \
247         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
248
249 libs_mpegvideoparser_LDADD = \
250         $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la \
251         $(GST_PLUGINS_BAD_LIBS) -lgstcodecparsers-@GST_API_VERSION@ \
252         $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
253
254 libs_h264parser_CFLAGS = \
255         $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
256         -DGST_USE_UNSTABLE_API \
257         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
258
259 libs_h264parser_LDADD = \
260         $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la \
261         $(GST_PLUGINS_BAD_LIBS) -lgstcodecparsers-@GST_API_VERSION@ \
262         $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
263
264 libs_vc1parser_CFLAGS = \
265         $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
266         -DGST_USE_UNSTABLE_API \
267         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
268
269 libs_vc1parser_LDADD = \
270         $(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la \
271         $(GST_PLUGINS_BAD_LIBS) -lgstcodecparsers-@GST_API_VERSION@ \
272         $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
273
274 elements_faad_CFLAGS = \
275         $(GST_PLUGINS_BASE_CFLAGS) \
276         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
277 elements_faad_LDADD = \
278         $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD) \
279         -lgstaudio-@GST_API_VERSION@
280
281 elements_faac_CFLAGS = \
282         $(GST_PLUGINS_BASE_CFLAGS) \
283         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
284 elements_faac_LDADD = \
285         $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD) \
286         -lgstaudio-@GST_API_VERSION@
287
288 elements_voaacenc_CFLAGS = \
289         $(GST_PLUGINS_BASE_CFLAGS) \
290         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
291 elements_voaacenc_LDADD = \
292         $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD) \
293         -lgstaudio-@GST_API_VERSION@
294
295 elements_baseaudiovisualizer_SOURCES = elements/baseaudiovisualizer.c \
296         $(top_srcdir)/gst/audiovisualizers/gstaudiovisualizer.c \
297         $(top_srcdir)/gst/audiovisualizers/gstaudiovisualizer.h
298 elements_baseaudiovisualizer_CFLAGS = $(GST_PLUGINS_BAD_CFLAGS) \
299         -I$(top_srcdir)/gst/audiovisualizers $(GST_PLUGINS_BASE_CFLAGS) \
300         $(GST_BASE_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS)
301 elements_baseaudiovisualizer_LDADD = \
302         $(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_API_VERSION@  \
303         -lgstvideo-@GST_API_VERSION@    $(GST_BASE_LIBS) $(GST_CONTROLLER_LIBS) \
304         $(GST_LIBS) $(LDADD)
305
306 elements_camerabin_CFLAGS = \
307         $(GST_PLUGINS_BAD_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \
308         $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(AM_CFLAGS) -DGST_USE_UNSTABLE_API
309 elements_camerabin_LDADD = \
310         $(top_builddir)/gst-libs/gst/interfaces/libgstphotography-@GST_API_VERSION@.la \
311         $(top_builddir)/gst-libs/gst/basecamerabinsrc/libgstbasecamerabinsrc-@GST_API_VERSION@.la \
312         -lgstpbutils-$(GST_API_VERSION) \
313         $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(LDADD)
314 elements_camerabin_SOURCES = elements/camerabin.c
315
316 elements_jifmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(EXIF_CFLAGS) $(AM_CFLAGS)
317 elements_jifmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_API_VERSION) $(GST_CHECK_LIBS) $(EXIF_LIBS) $(LDADD)
318 elements_jifmux_SOURCES = elements/jifmux.c
319
320 elements_timidity_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
321 elements_timidity_LDADD = $(GST_BASE_LIBS) $(LDADD)
322
323 elements_kate_CFLAGS = $(GST_BASE_CFLAGS) $(AM_CFLAGS)
324 elements_kate_LDADD = $(GST_BASE_LIBS) $(LDADD)
325
326 elements_rtpmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
327 elements_rtpmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstrtp-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD)
328
329 elements_assrender_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
330 elements_assrender_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) -lgstapp-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD)
331
332 elements_mpegtsmux_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(AM_CFLAGS)
333 elements_mpegtsmux_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_API_VERSION) $(GST_BASE_LIBS) $(LDADD)
334
335
336 EXTRA_DIST = gst-plugins-bad.supp
337
338 orc_bayer_CFLAGS = $(ORC_CFLAGS)
339 orc_bayer_LDADD = $(ORC_LIBS) -lorc-test-0.4
340 orc_cog_CFLAGS = $(ORC_CFLAGS)
341 orc_cog_LDADD = $(ORC_LIBS) -lorc-test-0.4
342
343 orc/cog.c: $(top_srcdir)/ext/cog/gstcogorc.orc
344         $(MKDIR_P) orc
345         $(ORCC) --test -o $@ $<
346
347 orc/bayer.c: $(top_srcdir)/gst/bayer/gstbayerorc.orc
348         $(MKDIR_P) orc
349         $(ORCC) --test -o $@ $<
350
351 clean-local-orc:
352         rm -rf orc
353