mirror of
https://gitlab.xiph.org/xiph/ezstream.git
synced 2024-12-04 14:46:31 -05:00
41 lines
815 B
Bash
Executable File
41 lines
815 B
Bash
Executable File
#!/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"
|
|
|
|
make distclean || :
|
|
./configure CFLAGS='-O0 -fprofile-arcs -ftest-coverage'
|
|
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
|
|
|
|
make distclean
|
|
|
|
echo "Coverage report available under $DESTDIR"
|