From: Peter O. <obe...@us...> - 2010-08-05 14:07:43
|
Update of /cvsroot/ltp/utils/analysis/lcov/bin In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv28828 Modified Files: lcov Log Message: lcov: switch coverage rate and number columns in list view To be more consistent with the order of output in the "Overall coverage rate" case, rates are now shown first in the list output. Index: lcov =================================================================== RCS file: /cvsroot/ltp/utils/analysis/lcov/bin/lcov,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** lcov 5 Aug 2010 11:22:12 -0000 1.69 --- lcov 5 Aug 2010 14:07:35 -0000 1.70 *************** *** 2944,2982 **** $heading2 = sprintf("%-*s|", $w, "Filename"); $barlen = $w + 1; ! # Number of lines ! $w = $fwidth[$F_LN_NUM]; $format .= "%${w}s "; ! $heading1 .= sprintf("%-*s |", $w + $fwidth[$F_LN_RATE], "Lines"); ! $heading2 .= sprintf("%-*s ", $w, "Num"); $barlen += $w + 1; ! # Line coverage rate ! $w = $fwidth[$F_LN_RATE]; $format .= "%${w}s|"; ! $heading2 .= sprintf("%*s|", $w, "Rate"); $barlen += $w + 1; ! # Number of functions ! $w = $fwidth[$F_FN_NUM]; $format .= "%${w}s "; ! $heading1 .= sprintf("%-*s|", $w + $fwidth[$F_FN_RATE] + 1, "Functions"); ! $heading2 .= sprintf("%-*s ", $w, "Num"); $barlen += $w + 1; ! # Function coverage rate ! $w = $fwidth[$F_FN_RATE]; $format .= "%${w}s|"; ! $heading2 .= sprintf("%*s|", $w, "Rate"); $barlen += $w + 1; ! # Number of branches ! $w = $fwidth[$F_BR_NUM]; $format .= "%${w}s "; ! $heading1 .= sprintf("%-*s", $w + $fwidth[$F_BR_RATE] + 1, "Branches"); ! $heading2 .= sprintf("%-*s ", $w, "Num"); $barlen += $w + 1; ! # Branch coverage rate ! $w = $fwidth[$F_BR_RATE]; $format .= "%${w}s"; ! $heading2 .= sprintf("%*s", $w, "Rate"); $barlen += $w; # Line end --- 2944,2982 ---- $heading2 = sprintf("%-*s|", $w, "Filename"); $barlen = $w + 1; ! # Line coverage rate ! $w = $fwidth[$F_LN_RATE]; $format .= "%${w}s "; ! $heading1 .= sprintf("%-*s |", $w + $fwidth[$F_LN_NUM], "Lines"); ! $heading2 .= sprintf("%-*s ", $w, "Rate"); $barlen += $w + 1; ! # Number of lines ! $w = $fwidth[$F_LN_NUM]; $format .= "%${w}s|"; ! $heading2 .= sprintf("%*s|", $w, "Num"); $barlen += $w + 1; ! # Function coverage rate ! $w = $fwidth[$F_FN_RATE]; $format .= "%${w}s "; ! $heading1 .= sprintf("%-*s|", $w + $fwidth[$F_FN_NUM] + 1, "Functions"); ! $heading2 .= sprintf("%-*s ", $w, "Rate"); $barlen += $w + 1; ! # Number of functions ! $w = $fwidth[$F_FN_NUM]; $format .= "%${w}s|"; ! $heading2 .= sprintf("%*s|", $w, "Num"); $barlen += $w + 1; ! # Branch coverage rate ! $w = $fwidth[$F_BR_RATE]; $format .= "%${w}s "; ! $heading1 .= sprintf("%-*s", $w + $fwidth[$F_BR_NUM] + 1, "Branches"); ! $heading2 .= sprintf("%-*s ", $w, "Rate"); $barlen += $w + 1; ! # Number of branches ! $w = $fwidth[$F_BR_NUM]; $format .= "%${w}s"; ! $heading2 .= sprintf("%*s", $w, "Num"); $barlen += $w; # Line end *************** *** 3070,3079 **** # Assemble line parameters push(@file_data, $print_filename); - push(@file_data, shorten_number($found, $fwidth[$F_LN_NUM])); push(@file_data, $rate); ! push(@file_data, shorten_number($fn_found, $fwidth[$F_FN_NUM])); push(@file_data, $fnrate); ! push(@file_data, shorten_number($br_found, $fwidth[$F_BR_NUM])); push(@file_data, $brrate); # Print assembled line --- 3070,3079 ---- # Assemble line parameters push(@file_data, $print_filename); push(@file_data, $rate); ! push(@file_data, shorten_number($found, $fwidth[$F_LN_NUM])); push(@file_data, $fnrate); ! push(@file_data, shorten_number($fn_found, $fwidth[$F_FN_NUM])); push(@file_data, $brrate); + push(@file_data, shorten_number($br_found, $fwidth[$F_BR_NUM])); # Print assembled line *************** *** 3108,3117 **** # Assemble line parameters push(@footer, sprintf("%*s", $strlen, "Total:")); - push(@footer, shorten_number($total_found, $fwidth[$F_LN_NUM])); push(@footer, $rate); ! push(@footer, shorten_number($fn_total_found, $fwidth[$F_FN_NUM])); push(@footer, $fnrate); ! push(@footer, shorten_number($br_total_found, $fwidth[$F_BR_NUM])); push(@footer, $brrate); # Print assembled line --- 3108,3117 ---- # Assemble line parameters push(@footer, sprintf("%*s", $strlen, "Total:")); push(@footer, $rate); ! push(@footer, shorten_number($total_found, $fwidth[$F_LN_NUM])); push(@footer, $fnrate); ! push(@footer, shorten_number($fn_total_found, $fwidth[$F_FN_NUM])); push(@footer, $brrate); + push(@footer, shorten_number($br_total_found, $fwidth[$F_BR_NUM])); # Print assembled line |