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