mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2025-02-02 15:07:45 -05:00
Add script to generate coverage reports using lcov.
This commit is contained in:
parent
9c842281fa
commit
36511d9408
@ -10,4 +10,4 @@ AM_CPPFLAGS = @EZ_CPPFLAGS@
|
|||||||
AM_CFLAGS = @EZ_CFLAGS@
|
AM_CFLAGS = @EZ_CFLAGS@
|
||||||
AM_LDFLAGS = @EZ_LDFLAGS@ -avoid-version
|
AM_LDFLAGS = @EZ_LDFLAGS@ -avoid-version
|
||||||
|
|
||||||
CLEANFILES = *~ *.core core
|
CLEANFILES = *~ *.core core *.gcno *.gcda
|
||||||
|
38
gen-coverage-report.sh
Executable file
38
gen-coverage-report.sh
Executable file
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PROGRAM="ezstream"
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
trap '' 1
|
||||||
|
trap 'exit 1' 2 15
|
||||||
|
|
||||||
|
BUILD_DATE=$(date '+%Y%m%d')
|
||||||
|
DESTDIR=$PROGRAM-coverage-$BUILD_DATE
|
||||||
|
|
||||||
|
if [ -z "$(which lcov)" ]; then
|
||||||
|
echo "lcov is required" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -z "$(which genhtml)" ]; then
|
||||||
|
echo "genhtml is required" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf "$DESTDIR"
|
||||||
|
|
||||||
|
./configure CFLAGS='-O0 -fprofile-arcs -ftest-coverage'
|
||||||
|
make clean
|
||||||
|
make check
|
||||||
|
|
||||||
|
mkdir -p $DESTDIR
|
||||||
|
lcov --capture --output-file $DESTDIR/coverage.tmp \
|
||||||
|
--rc lcov_branch_coverage=1 \
|
||||||
|
--directory src \
|
||||||
|
--test-name "Ezstream $VERSION"
|
||||||
|
genhtml --prefix . --output-directory $DESTDIR \
|
||||||
|
--branch-coverage --function-coverage \
|
||||||
|
--rc lcov_branch_coverage=1 \
|
||||||
|
--title "Ezstream $VERSION" --legend --show-detail $DESTDIR/coverage.tmp
|
||||||
|
|
||||||
|
echo "Coverage report available under $DESTDIR"
|
@ -42,4 +42,4 @@ AM_CPPFLAGS = @EZ_CPPFLAGS@ -I$(top_srcdir)/compat
|
|||||||
AM_CFLAGS = @EZ_CFLAGS@
|
AM_CFLAGS = @EZ_CFLAGS@
|
||||||
AM_LDFLAGS = @EZ_LDFLAGS@ -avoid-version
|
AM_LDFLAGS = @EZ_LDFLAGS@ -avoid-version
|
||||||
|
|
||||||
CLEANFILES = core *.core *~ .*~
|
CLEANFILES = core *.core *~ .*~ *.gcno *.gcda
|
||||||
|
@ -24,4 +24,4 @@ AM_LDFLAGS = @EZ_LDFLAGS@
|
|||||||
|
|
||||||
EXTRA_DIST = compat.h
|
EXTRA_DIST = compat.h
|
||||||
|
|
||||||
CLEANFILES = *~ *.core core
|
CLEANFILES = *~ *.core core *.gcno *.gcda
|
||||||
|
Loading…
Reference in New Issue
Block a user