1 include $(top_srcdir)/common/check.mak
3 CHECK_REGISTRY = $(top_builddir)/tests/check/test-registry.reg
5 GST_TOOLS_DIR = $(top_builddir)/tools
7 REGISTRY_ENVIRONMENT = \
8 GST_REGISTRY=$(CHECK_REGISTRY)
10 AM_TESTS_ENVIRONMENT = \
11 GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)" \
12 $(REGISTRY_ENVIRONMENT) \
13 GST_PLUGIN_SCANNER_1_0=$(top_builddir)/libs/gst/helpers/gst-plugin-scanner \
14 GST_PLUGIN_SYSTEM_PATH_1_0= \
15 GST_PLUGIN_PATH_1_0=$(top_builddir)/plugins
17 plugindir = $(libdir)/gstreamer-@GST_API_VERSION@
19 # override to _not_ install the test plugins
20 install-pluginLTLIBRARIES:
22 # the core dumps of some machines have PIDs appended, test registry and
24 CLEANFILES = core core.* test-registry.* *.gcno *.gcda
26 SUPPRESSIONS = $(top_srcdir)/common/gst.supp
28 clean-local: clean-local-check
30 # These tests don't even build any longer:
34 PARSE_CHECKS = pipelines/parse-disabled
36 PARSE_CHECKS = pipelines/simple-launch-lines pipelines/cleanup pipelines/parse-launch
39 # Do not run the abi test in case any option which causes the API to change has
41 if !GST_DISABLE_REGISTRY
43 ABI_CHECKS = gst/gstabi
47 if !GST_DISABLE_GST_DEBUG
48 PRINTF_CHECKS = gst/gstprintf
53 LIBSABI_CHECKS = libs/libsabi
56 CXX_CHECKS = gst/gstcpp libs/gstlibscpp
61 # if it's calling gst_element_factory_make(), it will probably not work without
63 if GST_DISABLE_REGISTRY
73 gst/gstelementfactory \
99 elements/streamiddemux \
106 libs/typefindhelper \
109 pipelines/queue-error
122 gst/gstcapsfeatures \
155 libs/bitreader-noinline \
156 libs/bytereader-noinline \
157 libs/bytewriter-noinline \
162 libs/gstnetclientclock \
163 libs/gstnettimeprovider \
172 # elements to ignore for the state tests
173 # STATE_IGNORE_ELEMENTS =
175 TESTS = $(check_PROGRAMS)
185 gst/struct_x86_64.h \
189 libs/struct_ppc32.h \
190 libs/struct_ppc64.h \
191 libs/struct_sparc.h \
195 libs/test_transform.c
197 AM_CFLAGS = $(GST_OBJ_CFLAGS) -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS \
198 -DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_STATE_IGNORE_ELEMENTS\""
199 AM_CXXFLAGS = $(GST_OBJ_CXXFLAGS) -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS \
200 -DGST_CHECK_TEST_ENVIRONMENT_BEACON="\"GST_STATE_IGNORE_ELEMENTS\""
201 LDADD = $(top_builddir)/libs/gst/check/libgstcheck-@GST_API_VERSION@.la \
202 $(top_builddir)/libs/gst/base/libgstbase-@GST_API_VERSION@.la \
205 gst_gstcpp_SOURCES = gst/gstcpp.cc
207 libs_gstlibscpp_SOURCES = libs/gstlibscpp.cc
209 gst_gstutils_LDADD = $(LDADD) $(GSL_LIBS) $(GMP_LIBS)
211 gst_gstprintf_LDADD = \
212 $(top_builddir)/gst/printf/libgstprintf.la \
215 elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
216 -DTESTFILE=\"$(top_srcdir)/configure.ac\"
217 elements_filesrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
218 -DTESTFILE=\"$(top_srcdir)/configure.ac\"
220 libs_controller_LDADD = \
221 $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_API_VERSION@.la \
223 libs_gstnetclientclock_LDADD = \
224 $(top_builddir)/libs/gst/net/libgstnet-@GST_API_VERSION@.la \
226 libs_gstnettimeprovider_LDADD = \
227 $(top_builddir)/libs/gst/net/libgstnet-@GST_API_VERSION@.la \
231 # these just need valgrind fixing, period
234 pipelines/parse-launch \
240 # these need fixing because the threads cause segfaults under valgrind
245 VALGRIND_TESTS_DISABLE = \
250 # indexers does not get tested yet
254 libs/gst/controller \
258 COVERAGE_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov))
259 COVERAGE_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_FILES))
260 COVERAGE_OUT_FILES = $(foreach dir,$(COVERAGE_DIRS),$(wildcard $(top_builddir)/$(dir)/*.gcov.out))
261 COVERAGE_OUT_FILES_REL = $(subst $(top_builddir)/,,$(COVERAGE_OUT_FILES))
264 echo $(COVERAGE_FILES)
265 echo $(COVERAGE_FILES_REL)
269 # we rebuild a registry and do gst-inspect so that all the get/set codepaths
272 for file in `find $(top_builddir) -name '*.gcda'`; do rm $$file; done
273 -rm $(CHECK_REGISTRY)
274 echo "Inspecting all elements"
275 for e in `$(GST_INSPECT) | head -n -2 | cut -d: -f2`; do $(GST_INSPECT) $$e > /dev/null 2>&1; done
280 echo "You need to configure with --enable-gcov to get coverage data"
286 for dir in $(COVERAGE_DIRS); do \
287 mkdir -p coverage/$$dir; \
288 make -C $(top_builddir)/$$dir gcov; \
290 for dir in $(COVERAGE_DIRS); do \
291 files="`ls $(top_builddir)/$$dir/*.gcov.out 2> /dev/null`"; \
292 if test ! -z "$$files"; then \
293 perl $(top_srcdir)/common/coverage/coverage-report.pl \
294 $(top_builddir)/$$dir/*.gcov.out > \
295 coverage/$$dir/index.xml; \
296 xsltproc $(top_srcdir)/common/coverage/coverage-report.xsl \
297 coverage/$$dir/index.xml > coverage/$$dir/index.html; \
300 for file in $(COVERAGE_FILES_REL); do \
301 echo Generating coverage/$$file.html; \
302 perl $(top_srcdir)/common/coverage/coverage-report-entry.pl \
303 $(top_builddir)/$$file > coverage/$$file.html; \