xref: /glogg/tests/coverage.sh (revision a5fe2ced943c099d97272fdddb081795add3fffa)
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