xref: /glogg/tests/coverage.sh (revision da452361b536bce4895420ec294f0cd62ba45252)
1#!/bin/bash
2
3FILES="logdata.cpp logfiltereddata.cpp logdataworkerthread.cpp logfiltereddataworkerthread.cpp"
4
5for i in $FILES; do
6    gcov -b $i | perl -e "while(<>) { if (/^File '.*$i'/) { \$print = 1; }
7    if ( \$print ) { if (/:creating '/) { \$print = 0; print \"\n\" } else { print; } } }"
8done
9
10mkdir coverage
11mv *.gcov coverage/
12rm *.{gcda,gcno}
13