diff options
| author | Roland McGrath <[email protected]> | 2005-12-05 22:46:21 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2005-12-05 22:46:21 +0000 |
| commit | 994b4899278199fc4d307780dac0ea50b238bc74 (patch) | |
| tree | 319952538a8556fa7f4d1ffcb4ae258fc6c47a5b /tests/coverage.sh | |
| parent | 038129b11ac71a13ccaf9029122be86d6c532990 (diff) | |
merge of 2cc527e6d8c8ff19dab478f7d12e58f1cfa6d6f5
and 7b542932f3e2947183b45bdbf39d448f457da9fd
Diffstat (limited to 'tests/coverage.sh')
| -rwxr-xr-x | tests/coverage.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/coverage.sh b/tests/coverage.sh index 288ee990..5cc353c9 100755 --- a/tests/coverage.sh +++ b/tests/coverage.sh @@ -1,11 +1,18 @@ #! /bin/bash +if [ "x$1" = "x-v" ]; then + verbose=yes +else + verbose=no +fi + cd .. for d in lib libasm libdw libdwfl libebl libelf backends src; do tmp=$d-data cd $d unused=0 + unused_files= for f in *.gcno; do base="$(basename $f .gcno)" fc="$base.c" @@ -15,6 +22,7 @@ for d in lib libasm libdw libdwfl libebl libelf backends src; do gawk "/$d.$fc/ { getline; co=gensub(/.*:(.*)% .*/, \"\\\\1\", \"g\"); co=co+0.0; li=\$4+0; printf \"%-35s %6.2f %5d\n\", \"$d/$fc\", co, li } " >> $tmp else unused=$(($unused + 1)) + unused_files="$unused_files $fc" fi done if [ -f $tmp ]; then @@ -23,5 +31,10 @@ for d in lib libasm libdw libdwfl libebl libelf backends src; do else printf "%-12s 0.00%% covered unused files: %3d\n" "$d" $unused fi + if [ $verbose = yes ]; then + for f in $unused_files; do + printf '%-42s%s\n' '' $f + done + fi cd .. done |
