mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
script to generate coverage report
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
462dfe0115
commit
3372efb185
1 changed files with 19 additions and 0 deletions
19
scripts/coverage.sh
Executable file
19
scripts/coverage.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cwd="$(readlink -f $(dirname $0))"
|
||||||
|
|
||||||
|
rm -rf "$cwd/../debug"
|
||||||
|
mkdir -p "$cwd/../debug"
|
||||||
|
cd "$cwd/../debug"
|
||||||
|
|
||||||
|
export CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
|
||||||
|
export LDFLAGS="$LDFLAGS -fprofile-arcs -ftest-coverage"
|
||||||
|
|
||||||
|
cmake ../ -DCMAKE_BUILD_TYPE=Debug \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=/usr $@ \
|
||||||
|
-DKATIE_TESTS=ON
|
||||||
|
make -j $(nproc || sysctl -n hw.ncpu || echo 1)
|
||||||
|
|
||||||
|
gcovr -r ../src $PWD
|
Loading…
Add table
Reference in a new issue