Skip to content

Commit

Permalink
avoid too big differences in result
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jul 10, 2013
1 parent 9ace305 commit 2bfb713
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
35 changes: 33 additions & 2 deletions genhtml.patch
@@ -1,5 +1,5 @@
--- genhtml_ori 2013-07-06 20:45:58.973043561 +0200
+++ genhtml 2013-07-06 20:46:22.473043550 +0200
--- genhtml_ori 2013-07-10 19:23:55.041055126 +0200
+++ genhtml 2013-07-10 19:31:39.041172541 +0200
@@ -2351,7 +2351,8 @@

($year, $month, $day) = (localtime())[5, 4, 3];
Expand All @@ -10,3 +10,34 @@
}


@@ -3807,9 +3808,10 @@
} else {
$class = "branchCov";
$text = " + ";
- $title = "Branch $br_num was taken $taken ".
- "time";
- $title .= "s" if ($taken > 1);
+ #$title = "Branch $br_num was taken $taken ".
+ # "time";
+ #$title .= "s" if ($taken > 1);
+ $title = "Branch $br_num was taken X times";
}
$current .= "[" if ($open);
$current .= "<span class=\"$class\" title=\"$title\">";
@@ -3892,6 +3894,8 @@
$count_format = format_count($count, $count_field_width);
}
else {
+ # force to 1 to avoid huge diffs between runs
+ $count = 1;
$result = $count;
$source_format = '<span class="lineCov">';
$count_format = format_count($count, $count_field_width);
@@ -5127,6 +5131,7 @@
$countstyle = "coverFnLo";
} else {
$countstyle = "coverFnHi";
+ $count = "X";
}

write_html(*HTML_HANDLE, <<END_OF_HTML)
2 changes: 1 addition & 1 deletion run_code_coverage_upload.sh
Expand Up @@ -2,7 +2,7 @@
lcov --directory . --capture --output-file mapserver.info

cp /usr/bin/genhtml .
# to remove date, so that only real differences show up
# to remove date and occurences number, so that only real differences show up
patch -p0 < genhtml.patch

./genhtml -o ./mapserver_coverage_html --num-spaces 2 mapserver.info
Expand Down

0 comments on commit 2bfb713

Please sign in to comment.