Skip to content

Commit 77c72bc

Browse files
committed
add log
1 parent 92024e0 commit 77c72bc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/testcoverage/coverage/profile.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ func findProfileForFile(profiles []*cover.Profile, file string) (int, bool) {
6666

6767
func mergeSameFileProfile(ap, bp *cover.Profile) (*cover.Profile, error) {
6868
if len(ap.Blocks) != len(bp.Blocks) {
69+
logger.L.Debug().
70+
Str("a-file", ap.FileName).
71+
Int("a-len", len(ap.Blocks)).
72+
Str("b-file", bp.FileName).
73+
Int("b-len", len(bp.Blocks)).
74+
Msg("inconsistent profile length")
75+
6976
return nil, fmt.Errorf("inconsistent profiles length [%q, %q]", ap.FileName, bp.FileName)
7077
}
7178

0 commit comments

Comments
 (0)