forked from RipcordSoftware/libhttpserver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcoverage.sh
More file actions
executable file
·27 lines (24 loc) · 779 Bytes
/
Copy pathcoverage.sh
File metadata and controls
executable file
·27 lines (24 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
GCOV_TOOL=
if [ "$1" != "" ]; then
GCOV_TOOL="--gcov-tool $1"
else
which lcov > /dev/null
if [ $? -ne 0 ]; then
echo "You must have lcov installed to run this script."
echo "Install with 'yum install lcov' or 'apt-get install lcov'"
exit 1
fi
fi
lcov -b src/libhttpserver --directory src/libhttpserver/build/Debug/GNU-Linux-x86/ --capture --output-file coverage.info ${GCOV_TOOL}
lcov --remove coverage.info 'tests/*' '/usr/*' '*/externals/*' '*/boost/*' --output-file coverage.info ${GCOV_TOOL}
lcov --list coverage.info ${GCOV_TOOL}
if [ "$CI" = "true" ] && [ "$TRAVIS" = "true" ]; then
coveralls-lcov coverage.info
else
rm -rf coverage
mkdir -p coverage
cd coverage
genhtml ../coverage.info
cd ..
fi