Commit 49c2fc5c authored by Stefan Kost's avatar Stefan Kost

coverage/lcov.mak: Update coverage make-rules: use them conditionaly, use...

coverage/lcov.mak: Update coverage make-rules: use them conditionaly, use libtool mode and use lcov to cleanup.

Original commit message from CVS:
* coverage/lcov.mak:
Update coverage make-rules: use them conditionaly, use libtool mode
and use lcov to cleanup.
parent 97075907
2008-01-09 Stefan Kost <ensonic@users.sf.net>
* coverage/lcov.mak:
Update coverage make-rules: use them conditionaly, use libtool mode
and use lcov to cleanup.
2007-12-18 Sebastian Dröge <slomo@circular-chaos.org>
* glib-gen.mak:
......
## .PHONY so it always rebuilds it
.PHONY: lcov-reset lcov lcov-run lcov-report lcov-upload
# run lcov from scratch, always
lcov-reset:
make lcov-run
......@@ -7,23 +10,33 @@ lcov-reset:
lcov:
make lcov-reset
if GST_GCOV_ENABLED
# reset run coverage tests
lcov-run:
@-rm -rf lcov
find . -name "*.gcda" -exec rm {} \;
if test -d tests/check; then make -C tests/check inspect; fi
make check
lcov --directory . --zerocounters
-if test -d tests/check; then $(MAKE) -C tests/check inspect; fi
-$(MAKE) check
# generate report based on current coverage data
lcov-report:
mkdir lcov
lcov --directory . --capture --output-file lcov/lcov.info
lcov --compat-libtool --directory . --capture --output-file lcov/lcov.info
lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
lcov -l lcov/lcov.info | grep "tests/check/" | cut -d: -f1 >> lcov/remove
lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
rm lcov/remove
mv lcov/lcov.cleaned.info lcov/lcov.info
genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
genhtml -t "$(PACKAGE_STRING)" -o lcov --num-spaces 2 lcov/lcov.info
lcov-upload: lcov
rsync -rvz -e ssh --delete lcov/* gstreamer.freedesktop.org:/srv/gstreamer.freedesktop.org/www/data/coverage/lcov/$(PACKAGE)
else
lcov-run:
echo "Need to reconfigure with --enable-gcov"
lcov-report:
echo "Need to reconfigure with --enable-gcov"
endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment