Commit 1bb60d1a authored by Pekka Pessi's avatar Pekka Pessi
Browse files

scripts/coverage: fixed whitespace

darcs-hash:20081127232834-db55f-4d0c4f6ece1f84605746711b6048766f7c5e13fa.gz
parent 3446d101
...@@ -28,14 +28,14 @@ done ...@@ -28,14 +28,14 @@ done
{ {
for f in *.bb for f in *.bb
do do
test "$f" = "*.bb" && { echo "run 'make check' first"; exit 1; } test "$f" = "*.bb" && { echo "run 'make check' first"; exit 1; }
gcov $gcovflags "$f" 2>/dev/null gcov $gcovflags "$f" 2>/dev/null
done done
for f in $@ for f in $@
do do
gcov $gcovflags "$f" 2>/dev/null gcov $gcovflags "$f" 2>/dev/null
done done
} | } |
awk ' awk '
BEGIN { BEGIN {
...@@ -51,10 +51,10 @@ BEGIN { ...@@ -51,10 +51,10 @@ BEGIN {
else else
file = ""; file = "";
} }
file ~ /\.[hc]$/ && /Lines executed/ { file ~ /\.[hc]$/ && /Lines executed/ {
sub(/Lines executed:/, ""); sub(/Lines executed:/, "");
covered = int($3*$1/100 + 0.5); covered = int($3*$1/100 + 0.5);
# printf "%-5u %-5u %-5u %-7s %s\n", $3, covered, $3 - covered, $1, file; # printf "%-5u %-5u %-5u %-7s %s\n", $3, covered, $3 - covered, $1, file;
if ($3 == 0) { if ($3 == 0) {
/* skip */ /* skip */
...@@ -69,11 +69,11 @@ file ~ /\.[hc]$/ && /Lines executed/ { ...@@ -69,11 +69,11 @@ file ~ /\.[hc]$/ && /Lines executed/ {
} }
} }
/torture/ { next; } /torture/ { next; }
/test/ { next; } /test/ { next; }
/\/usr\/include/ { next; } /\/usr\/include/ { next; }
/(source )?lines executed in file (.*\/)?[-A-Za-z_0-9]+\.[ch]/ { /(source )?lines executed in file (.*\/)?[-A-Za-z_0-9]+\.[ch]/ {
file = $0; file = $0;
sub(/.* in file /, "", file); sub(/.* in file /, "", file);
sub(/.*\//, "", file); sub(/.*\//, "", file);
...@@ -98,7 +98,7 @@ END { ...@@ -98,7 +98,7 @@ END {
l = lines[file]; c = coverage[file]; l = lines[file]; c = coverage[file];
covered = int(c + 0.5); covered = int(c + 0.5);
total += l; total_coverage += c; total += l; total_coverage += c;
printf "%-5u %-5u %-5u %6.2f%% %s\n", printf "%-5u %-5u %-5u %6.2f%% %s\n",
l, covered, l - covered, 100.0 * c / l, file; l, covered, l - covered, 100.0 * c / l, file;
} }
if (total) { if (total) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment