codecanalyzer: remove
[platform/upstream/gstreamer.git] / validate / tests / check / Makefile.am
1 include $(top_srcdir)/common/check.mak
2
3 TESTS_ENVIRONMENT = 
4
5 plugindir = $(libdir)/gstreamer-@GST_API_VERSION@
6
7 # override to _not_ install the test plugins
8 install-pluginLTLIBRARIES:
9
10 # the core dumps of some machines have PIDs appended
11 CLEANFILES = core.* test-registry.* *.gcno *.gcda
12
13 common_cflags=-I$(top_srcdir) $(GST_PLUGINS_BASE_CFLAGS) $(GST_OBJ_CFLAGS) \
14         $(GST_CHECK_CFLAGS) $(GST_OPTION_CFLAGS) $(GST_CFLAGS)
15 common_ldadd=$(top_builddir)/gst/validate/libgstvalidate-@GST_API_VERSION@.la \
16         $(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_API_VERSION) \
17         $(GST_OBJ_LIBS) $(GST_CHECK_LIBS)
18
19 testutils_noisnt_libraries=libtestutils.la
20 testutils_noinst_headers=validate/test-utils.h
21 libtestutils_la_LIBADD=$(common_ldadd)
22 libtestutils_la_CFLAGS=$(common_cflags)
23 libtestutils_la_SOURCES=validate/test-utils.c
24
25 SUPPRESSIONS = $(top_srcdir)/common/gst.supp # $(srcdir)/gst-plugins-bad.supp
26
27 clean-local: clean-local-check
28
29 check_PROGRAMS = \
30         validate/padmonitor \
31         validate/monitoring \
32         validate/reporting \
33         validate/overrides
34
35 noinst_LTLIBRARIES=$(testutils_noisnt_libraries)
36 noinst_HEADERS=$(testutils_noinst_headers)
37
38 TESTS = $(check_PROGRAMS)
39
40 AM_CFLAGS =  $(common_cflags) -UG_DISABLE_ASSERT -UG_DISABLE_CAST_CHECKS
41 LDADD = $(common_ldadd) libtestutils.la
42
43 debug:
44         echo $(COVERAGE_FILES)
45         echo $(COVERAGE_FILES_REL)
46
47 .PHONY: coverage
48 if GST_GCOV_ENABLED
49 # we rebuild a registry and do gst-inspect so that all the get/set codepaths
50 # are also covered
51 coverage:
52         make check
53         make coverage-report
54 else
55 coverage:
56         echo "You need to configure with --enable-gcov to get coverage data"
57         exit 1
58 endif
59
60 coverage-report:
61         if test ! -e coverage; then
62                 rm -r coverage
63         fi
64         for dir in $(COVERAGE_DIRS); do                                 \
65           mkdir -p coverage/$$dir;                                      \
66           make -C $(top_builddir)/$$dir gcov;                           \
67         done
68         for dir in $(COVERAGE_DIRS); do                                 \
69             files="`ls $(top_builddir)/$$dir/*.gcov.out 2> /dev/null`"; \
70           if test ! -z "$$files"; then                                  \
71             perl $(top_srcdir)/common/coverage/coverage-report.pl       \
72               $(top_builddir)/$$dir/*.gcov.out >                        \
73               coverage/$$dir/index.xml;                                 \
74             xsltproc $(top_srcdir)/common/coverage/coverage-report.xsl  \
75               coverage/$$dir/index.xml > coverage/$$dir/index.html;     \
76           fi; \
77         done
78         for file in $(COVERAGE_FILES_REL); do                           \
79           echo Generating coverage/$$file.html;                         \
80           perl $(top_srcdir)/common/coverage/coverage-report-entry.pl   \
81             $(top_builddir)/$$file > coverage/$$file.html;              \
82         done
83
84 check-integration: integration
85         CK_DEFAULT_TIMEOUT=20 ./integration
86
87 check-integration-forever:
88         @while true; do                                         \
89         make check-integration                                  \
90         CK_DEFAULT_TIMEOUT=20                                   \
91         $* || break; done
92
93 check-integration-gdb:
94         @$(TESTS_ENVIRONMENT)                                   \
95         CK_FORK=no                                              \
96         $(LIBTOOL) --mode=execute                               \
97         gdb ./integration
98