Commit 5446423
committed
test: fix coverage coverage accounting
Commit "github-ci: add Coveralls support"
(31ebde8) introduced code coverage
support. However there is wrong value for option -covermode was
specified - "count". According to documentation [1] "count" calculates
how many times did each statement run and "atomic" mode is like "count",
but counts precisely in parallel programs. We don't use parallel mode in
tests at all (-p 1) and for code coverage measurement particularly, but
it is better using "atomic" mode instead "count".
Option "-coverpkg" was missed. "coverpkg" applies coverage analysis in
each test to packages matching the patterns. The default is for each
test to analyze only the package being tested. Total statement coverage
without -coverpkg is 66.8% and with -coverpkg is 69.3% according to "go
tool cover".
1. https://go.dev/blog/cover1 parent a9e491f commit 5446423
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
0 commit comments