mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
Add option --enable-gcov to build GStreamer with -fprofile-arcs and -ftest-coverage, which allows gcov to show inform...
Original commit message from CVS: Add option --enable-gcov to build GStreamer with -fprofile-arcs and -ftest-coverage, which allows gcov to show information about testsuite coverage.
This commit is contained in:
parent
41f4e04de9
commit
67062b7320
3 changed files with 65 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2004-01-08 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
|
* Makefile.am:
|
||||||
|
* configure.ac:
|
||||||
|
Add option --enable-gcov to build GStreamer with -fprofile-arcs
|
||||||
|
and -ftest-coverage, which allows gcov to show information about
|
||||||
|
testsuite coverage.
|
||||||
|
|
||||||
2004-01-08 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
2004-01-08 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
* gst/gstutils.h:
|
* gst/gstutils.h:
|
||||||
|
|
41
Makefile.am
41
Makefile.am
|
@ -50,6 +50,7 @@ EXTRA_DIST = gstreamer.spec.in gst-element-check.m4 \
|
||||||
|
|
||||||
CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
|
CLEANFILES = gst-element-check-@GST_MAJORMINOR@.m4
|
||||||
|
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
cp gstreamer.spec $(distdir)
|
cp gstreamer.spec $(distdir)
|
||||||
rm -rf `find $(distdir)/common -name CVS`
|
rm -rf `find $(distdir)/common -name CVS`
|
||||||
|
@ -59,3 +60,43 @@ rpm: dist
|
||||||
|
|
||||||
include $(top_srcdir)/idiottest.mak
|
include $(top_srcdir)/idiottest.mak
|
||||||
|
|
||||||
|
|
||||||
|
if GST_GCOV_ENABLED
|
||||||
|
clean-gcov:
|
||||||
|
find -name "*.da" -o -name "*.gcov" | xargs rm || true
|
||||||
|
|
||||||
|
clean-bbg:
|
||||||
|
find -name "*.bbg" -o -name "*.bb" | xargs rm || true
|
||||||
|
|
||||||
|
GCOV_DIRS=gst libs
|
||||||
|
|
||||||
|
## .PHONY so it always rebuilds it
|
||||||
|
.PHONY: coverage-report.txt
|
||||||
|
coverage-report.txt:
|
||||||
|
BBG_FILES=`find $(GCOV_DIRS) -name "*.bbg"` ; \
|
||||||
|
C_FILES= ; \
|
||||||
|
for F in $$BBG_FILES ; do \
|
||||||
|
F_nolibs=`echo $$F | sed -e 's/.libs\///g'` ; \
|
||||||
|
C=`echo $$F_nolibs | sed -e 's/.bbg/.c/g'` ; \
|
||||||
|
B=`basename $$F .bbg` ; \
|
||||||
|
D=`dirname $$F` ; \
|
||||||
|
DA=`echo $$F | sed -e 's/.bbg/.da/g'` ; \
|
||||||
|
DA_libs=`echo $$D/.libs/$$B/.da` ; \
|
||||||
|
if test -e $$DA || test -e $$DA_libs; then \
|
||||||
|
C_FILES="$$C_FILES $$C" ; \
|
||||||
|
fi ; \
|
||||||
|
done ; \
|
||||||
|
echo $$C_FILES ; \
|
||||||
|
$(top_builddir)/testsuite/decode-gcov --report $$C_FILES > coverage-report.txt
|
||||||
|
|
||||||
|
check-coverage: clean-gcov all check coverage-report.txt
|
||||||
|
cat coverage-report.txt
|
||||||
|
|
||||||
|
else
|
||||||
|
coverage-report.txt:
|
||||||
|
echo "Need to reconfigure with --enable-gcov"
|
||||||
|
|
||||||
|
check-coverage:
|
||||||
|
echo "Need to reconfigure with --enable-gcov"
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
16
configure.ac
16
configure.ac
|
@ -161,6 +161,22 @@ if test x$HAVE_CPU_PPC = xyes ; then
|
||||||
true)
|
true)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(gcov,
|
||||||
|
[--enable-gcov compile with coverage profiling instrumentation (gcc only)],
|
||||||
|
enable_gcov=$enableval,enable_gcov=no)
|
||||||
|
if test x$enable_gcov = xyes ; then
|
||||||
|
AS_COMPILER_FLAG(["-fprofile-arcs"],
|
||||||
|
[GST_INT_CFLAGS="$GST_INT_CFLAGS -fprofile-arcs"],
|
||||||
|
true)
|
||||||
|
AS_COMPILER_FLAG(["-ftest-coverage"],
|
||||||
|
[GST_INT_CFLAGS="$GST_INT_CFLAGS -ftest-coverage"],
|
||||||
|
true)
|
||||||
|
GST_INT_CFLAGS=`echo "$GST_INT_CFLAGS" | sed -e 's/-O[0-9]*//g'`
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes)
|
||||||
|
|
||||||
|
|
||||||
dnl Check for essential libraries first:
|
dnl Check for essential libraries first:
|
||||||
dnl ====================================
|
dnl ====================================
|
||||||
|
|
Loading…
Reference in a new issue