tee: Check for the removed pad flag also in the slow pushing path
[platform/upstream/gstreamer.git] / tests / check / meson.build
1 have_debug = true # FIXME
2
3 # tests and condition when to skip the test
4 core_tests = [
5   [ 'gst/gst.c', not gst_registry ],
6   [ 'gst/gstabi.c', not gst_registry ],
7   [ 'gst/gstatomicqueue.c' ],
8   [ 'gst/gstbuffer.c' ],
9   [ 'gst/gstbufferlist.c' ],
10   [ 'gst/gstbufferpool.c' ],
11   [ 'gst/gstchildproxy.c', not gst_registry ],
12   [ 'gst/gstclock.c' ],
13   [ 'gst/gstcontext.c' ],
14   [ 'gst/gstcontroller.c' ],
15   [ 'gst/gstcaps.c' ],
16   [ 'gst/gstcapsfeatures.c' ],
17   [ 'gst/gstdatetime.c' ],
18   [ 'gst/gstdeinit.c' ],
19   [ 'gst/gstdevice.c' ],
20   [ 'gst/gstelement.c', not gst_registry or not gst_parse],
21   [ 'gst/gstelementfactory.c', not gst_registry ],
22   [ 'gst/gstghostpad.c', not gst_registry ],
23   [ 'gst/gstinfo.c' ],
24   [ 'gst/gstiterator.c' ],
25   [ 'gst/gstmessage.c' ],
26   [ 'gst/gstmemory.c' ],
27   [ 'gst/gstmeta.c' ],
28   [ 'gst/gstminiobject.c' ],
29   [ 'gst/gstobject.c' ],
30   [ 'gst/gstpad.c', not gst_registry ],
31   [ 'gst/gstparamspecs.c' ],
32   [ 'gst/gstprintf.c', not gst_debug, printf_lib],
33   [ 'gst/gstpipeline.c', not gst_registry ],
34   [ 'gst/gstpoll.c' ],
35   [ 'gst/gstplugin.c', not gst_registry ],
36   [ 'gst/gstpreset.c' ],
37   [ 'gst/gstprotection.c' ],
38   [ 'gst/gstquery.c', not gst_registry ],
39   [ 'gst/gstregistry.c', not gst_registry ],
40   [ 'gst/gstpromise.c'],
41   [ 'gst/gstsegment.c' ],
42   [ 'gst/gststream.c' ],
43   [ 'gst/gststructure.c' ],
44   [ 'gst/gstsystemclock.c' ],
45   [ 'gst/gsttag.c' ],
46   [ 'gst/gsttagsetter.c' ],
47   [ 'gst/gsttask.c' ],
48   [ 'gst/gsttoc.c' ],
49   [ 'gst/gsttocsetter.c' ],
50   [ 'gst/gsttracerrecord.c', not tracer_hooks or not gst_debug],
51   [ 'gst/gsturi.c' ],
52   [ 'gst/gstutils.c', not gst_registry ],
53   [ 'gst/gstvalue.c' ],
54   [ 'generic/states.c', not gst_registry ],
55   [ 'libs/adapter.c' ],
56   [ 'libs/aggregator.c' ],
57   [ 'libs/baseparse.c' ],
58   [ 'libs/basesrc.c', not gst_registry ],
59   [ 'libs/basesink.c', not gst_registry ],
60   [ 'libs/bitreader.c' ],
61   [ 'libs/bitwriter.c' ],
62   [ 'libs/bytereader.c' ],
63   [ 'libs/bytewriter.c' ],
64   [ 'libs/bitreader-noinline.c' ],
65   [ 'libs/bytereader-noinline.c' ],
66   [ 'libs/bytewriter-noinline.c' ],
67   [ 'libs/collectpads.c', not gst_registry ],
68   [ 'libs/controller.c' ],
69   [ 'libs/flowcombiner.c' ],
70   [ 'libs/gstharness.c', not gst_parse ],
71   [ 'libs/gstnetclientclock.c' ],
72   [ 'libs/gstnettimeprovider.c' ],
73   [ 'libs/gsttestclock.c' ],
74   [ 'libs/libsabi.c' ],
75   [ 'libs/sparsefile.c' ],
76   [ 'libs/transform1.c' ],
77   [ 'libs/transform2.c' ],
78   [ 'libs/typefindhelper.c' ],
79   [ 'libs/queuearray.c' ],
80   [ 'elements/capsfilter.c', not gst_registry ],
81   [ 'elements/concat.c', not gst_registry ],
82   [ 'elements/dataurisrc.c', not gst_registry ],
83   [ 'elements/fakesrc.c', not gst_registry ],
84   # FIXME: blocked forever on Windows due to missing fcntl (.. O_NONBLOCK)
85   [ 'elements/fdsrc.c', not gst_registry or host_system == 'windows' ],
86   [ 'elements/filesink.c', not gst_registry ],
87   [ 'elements/filesrc.c', not gst_registry ],
88   [ 'elements/funnel.c', not gst_registry ],
89   [ 'elements/identity.c', not gst_registry or not gst_parse ],
90   [ 'elements/multiqueue.c', not gst_registry ],
91   [ 'elements/selector.c', not gst_registry ],
92   [ 'elements/streamiddemux.c', not gst_registry ],
93   [ 'elements/tee.c', not gst_registry or not gst_parse],
94   [ 'elements/queue.c', not gst_registry ],
95   [ 'elements/queue2.c', not gst_registry or not gst_parse],
96   [ 'elements/valve.c', not gst_registry ],
97   [ 'pipelines/seek.c', not gst_registry ],
98   [ 'pipelines/queue-error.c', not gst_registry or not gst_parse],
99   [ 'pipelines/parse-disabled.c', gst_parse ],
100   [ 'pipelines/simple-launch-lines.c', not gst_parse ],
101   [ 'pipelines/parse-launch.c', not gst_parse ],
102   [ 'pipelines/cleanup.c', not gst_parse ],
103   [ 'tools/gstinspect.c' ],
104   # These take quite long, put them at the end
105   [ 'elements/fakesink.c', not gst_registry ],
106   [ 'gst/gstbin.c', not gst_registry ],
107   [ 'gst/gstbus.c', not gst_registry ],
108   [ 'gst/gstevent.c', not gst_registry ],
109   [ 'pipelines/stress.c', not gst_registry ],
110   [ 'generic/sinks.c', not gst_registry ],
111 ]
112
113 # Make sure our headers are C++ clean
114 if add_languages('cpp', required : false)
115   core_tests += [
116     [ 'gst/gstcpp.cc', not gst_registry ],
117     [ 'libs/gstlibscpp.cc', false ],
118   ]
119 endif
120
121 test_defines = [
122   '-UG_DISABLE_ASSERT',
123   '-UG_DISABLE_CAST_CHECKS',
124   '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"',
125   '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"',
126   '-DGST_USE_UNSTABLE_API',
127   '-DGST_DISABLE_DEPRECATED',
128 ]
129
130 # sanity checking
131 if get_option('check').disabled()
132   if get_option('tests').enabled()
133     error('Building of unit tests was requested, but GStreamer check library was disabled.')
134   endif
135 endif
136
137 glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep]
138 gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep]
139
140 foreach t : core_tests
141   fname = t[0]
142   test_name = fname.split('.')[0].underscorify()
143   skip_test = t.get(1, false)
144   link_with_libs = t.get(2, [])
145
146   if not skip_test
147     exe = executable(test_name, fname,
148         c_args : gst_c_args + test_defines,
149         cpp_args : gst_c_args + test_defines,
150         include_directories : [configinc],
151         link_with : link_with_libs,
152         dependencies : test_deps + glib_deps + gst_deps,
153     )
154
155     env = environment()
156     env.set('GST_PLUGIN_PATH_1_0', meson.build_root())
157     env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
158     env.set('GST_STATE_IGNORE_ELEMENTS', '')
159     env.set('CK_DEFAULT_TIMEOUT', '20')
160     env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
161     env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
162     env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
163
164     test(test_name, exe, env: env, timeout : 3 * 60)
165   endif
166 endforeach